
ust a few weeks ago, the Open Handset Alliance pushed its baby "Android" out into the spotlight. While no devices available on the market run it, Google has offered 10 million dollars in prize money to the developers who create the most compelling applications. The code exposed in this article isn't going to win any of that money on its own, but perhaps it can get you started towards your own Android application. After you finish this article, you'll understand the basics of setting up the SDK, displaying text using the XML layout schema, getting the device's location from the GPS component, and finally rendering your own text with a custom view implementation.
Getting Setup
The code for this article was written on Mac OS X with Eclipse. Since Android ships with a plug-in for Eclipse it seemed the natural choice for a get-to-know-you article. Your mileage may vary. If you want to follow along directly with this article you can start by grabbing the following software:
If you're using a different SDK, go ahead and skip down to the next section.
To get started, install Eclipse, then get the Android SDK and install the plug-in with the directions linked above. Creating an Android project should now be as simple as clicking "New" in the file menu. Traditionally, new languages are first demonstrated with the help of a "Hello World" application. But, since "Hello World" is so last decade, we'll focus on something a little more interesting like "Hello World: Here I am." Along the way, we'll talk about custom vs. XML-driven views, GPS, and a few of the differences between other SDKs and Android.