"Fill In The Blank"

We've been plannin' this weekend for a week and a half
Hope you ain't thinkin' that we're movin' too fast
This trip can be whatever you want it to
I'll pick where we go and you can pick what we do
We could
In the water, in the truck
On a blanket 'til the sun comes up
With each other on the river bank
Yeah I'll leave it up to you, baby fill in the blank
I know a little spot thirty miles outta town
We can do what we want, won't be nobody around
I love hanging with your friends and your family too
But there's some things that only two people should do
We could
In the water, in the truck
On a blanket 'til the sun comes up
With each other on the river bank
Yeah I'll leave it up to you, baby fill in the blank
We could
In the water, in the truck
On a blanket 'til the sun comes up
With each other on the river bank
Yeah I'll leave it up to you, baby
We could
To some music real slow
'Til we can't no more
If the clouds roll in we could, in the rain
Yeah I'll leave it up to you, baby fill in the blank
Yeah the options are endless, baby fill in the blank
Oh Yeah
Welcome to Android Application Development Blog, the first For Beginner blog that covers Android application development. When  I was contacted to write this blog, I was ecstatic about the opportunity to spread the wealth of knowledge that I’d picked up over the past year and a half of Android development. I hope you enjoy finding out about how to program for the Android platform from this blog as much as I enjoyed writing it!

When Android was acquired by Google in 2005 (yes, Android was a start-up company at one point), I’ll be honest, I didn’t have much interest in it. I heard that Google might be entering the mobile space, but as with anything in the technology industry, I didn’t believe it until I saw it firsthand. Fast-forward to a few years later, when Google announced its first Android phone: the G1. When I heard this news, I was glued to the computer, reading reviews, watching videos, and researching the product as much as I could. I knew that this
product would be the start of something huge.

I got my start in Android development about a week after my wife received her first G1 Android device. The G1 was the first publicly released Android device. It didn’t match the rich feature set of the iPhone at the time, but I desperately believed in the platform. As soon as Donut (Android 1.6) was released, it was evident that Google was putting some effort into the product. Immediately after version 1.6 was released, talk of 2.0 was already on the horizon.

Today, we’re on version 2.2 of the Android platform, and 3.0 is just around the corner. The platform is barely two years old, and I see no sign of the platform development slowing down. Without doubt, this is an exciting time in Android development. I hope that your excitement carries through as you read this blog and later as you release your own applications on the market.

Android Application Development  is a beginner’s guide to developing Android applications. You don’t need any Android application development experience under your belt to get started. I expect you to approach this material as a blank slate because the Android platform accomplishes various mechanisms by using different paradigms that most programmers aren’t used to using — or developing with — on a day-to-day basis. I expect you to be familiar with the Java programming language, however. You don’t have to be a Java guru, but you should understand the syntax, basic data structures, and language constructs. XML is also used in developing Android applications, so I advise understanding XML as well.

The Android platform is a device-independent platform, which means that you can develop applications for various devices. These devices include but aren’t limited to phones, e-book readers, netbooks, and GPS devices. Soon, television sets will join the list. Yes, you read it correctly — TV! Google has announced plans to include a Google TV offering in the Android platform. Finding out how to develop for the Android platform opens a large variety of development options for you. This book distills hundreds, if not thousands, of pages of Android documentation, tips, tricks, and tutorials into a short, digestible format that allows you to springboard into your future as an Android developer. This book isn’t a recipe book, but it gives you the basic knowledge to assemble various pieces of the Android framework to create interactive and compelling applications.

Throughout the blog, you use the Android framework classes, and you will be creating Java classes and XML files.

Code examples in this blog appear in a monospace font so that they stand out from other text in the blog. This means that the code you’ll see looks like this:


Java is a high-level programming language that is case-sensitive, so be sure to enter the text into the editor exactly as you see it in the book. I also use the standard Java conventions in this book. Therefore, you can transition easily between my examples and the example code provided by the Android Software Development Kit (SDK). All class names, for example, appear in PascalCase format, and all class-scoped variables start with m.

All the URLs in the book appear in monospace font as well:


If you’re ever unsure about anything in the code, you can download the full source code from my GitHub account, located at http://github.com/ donnfelker. From time to time, I provide code updates to the source. You can also find other examples in my other source repositories stored on the same site.