RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Getting Down and Dirty with Google's Android

The best way to understand a new SDK is to work with it. With that in mind, we'll show you how to do some basic location based services and simple UI layout using Google's newest upstart mobile offering.

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.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date