Select Page

I don’t have to tell you mobile apps are hot right now. It’s an exciting technology area to be involved with and Android is one of the platforms generating considerable momentum. If you have some Java programming experience or want to learn it, the Android platform provides one of the shortest ramp-ups in mobile app development.

This post will provide you with a super-fast technical overview of the Android platform and underlying technology and will help you get up and running with the tools for development. If you are completely new to Java you might want to start with some Java tutorials first to get your feet wet. With that out of the way, let’s get started.

What is Android?

Android is a mobile devices software stack including OS, middleware, and applications. The Android SDK provides the tools and API’s for development in Java.

Features:

  • Dalvik Virtual Machine (VM) optimized for mobile devices
  • Browser based on WebKit
  • Graphics 2D and 3D (using OpenGL ES)
  • SQLite for data storage
  • Media support for common formats
  • GSM, Bluetooth, EDGE, 3G, 4G, WiFi
  • Camera, GPS, compass, accelerometer

Android Internals

  • Applications are primarily written in Java
  • Application Framework provides API’s specific to Android
  • Libraries are written in C/C++ and are used by the Framework
  • Android Runtime includes core libraries of Java (but not all)
  • Each Android app runs in its own process and instance of Dalvik VM.
  • Linux Kernel 2.6 provides core services and abstracts hardware layer
Android Stack Block Diagram

Android Stack Block Diagram

What do I need to develop on Android?

You don’t need anything other than a computer and internet connection to get set up for Android development. The Android development tools are free to download and use. Development can be done on any of the following operating systems:

  • Windows
  • Mac OS X
  • Linux

How do I get started developing with Android?

Getting started is pretty straight forward but there are several steps involved and a lot of details on Google’s Android Developer website that might make it a challenge to keep everything straight. I’ve put together a list of steps you can follow in order to get up and running as quickly as possible.

  • Download the Java 6 SDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html
    • Choose Java Platform (JDK)
  • Download Eclipse: http://www.eclipse.org/downloads/
    • Choose The Eclipse IDE for Java Developers.
  • Download the Android SDK starter package: http://developer.android.com/sdk/index.html
    • Choose the version for your operating system.
  • Install the Android Development Tools (ADT) for Eclipse
    • Start Eclipse, then select Help > Install New Software.
    • In the Available Software dialog, click Add….
    • In the Add Site dialog that appears, enter a name for the remote site (for example, “Android Plugin”) in the “Name” field.
    • In the “Location” field, enter this URL:
    • https://dl-ssl.google.com/android/eclipse/
    • Note: If you have trouble acquiring the plugin, you can try using “http” in the URL, instead of “https” (https is preferred for security reasons).
    • Click OK.
    • Back in the Available Software view, you should now see “Developer Tools” added to the list. Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next.
    • In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. Click Next to read and accept the license agreement and install any dependencies, then click Finish.
    • Restart Eclipse.
  • Configure the ADT

Once you’ve successfully downloaded ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:

  • Select Window > Preferences… to open the Preferences panel (Mac OS X: Eclipse > Preferences).
  • Select Android from the left panel.
  • For the SDK Location in the main panel, click Browse… and locate your downloaded SDK directory.
  • Click Apply, then OK.
  • Add an Android Platform and other components

Select Window > Android SDK and AVD Manager.

Once you’ve successfully downloaded ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:

  • Select Window > Preferences… to open the Preferences panel (Mac OS X: Eclipse > Preferences).
  • Select Android from the left panel.
  • For the SDK Location in the main panel, click Browse… and locate your downloaded SDK directory.
  • Click Apply, then OK.
  • Add an Android Platform and other components
    • Select Window > Android SDK and AVD Manager
The Android SDK Available Packages panel

The Android SDK Available Packages panel

  • Select Available Packages in the left panel. This will reveal all of the components that are currently available for download from the SDK repository.
  • Select the component(s) you’d like to install and click Install Selected.
    • Choose the SDK platform version(s) to get started with, you can start with 1.6.

Determining which version to develop for depends on what features you want to use from the SDK and how broadly you want to distribute your app. See this page for the breakdown of Android devices and OS versions: http://developer.android.com/resources/dashboard/platform-versions.html

  • Also select the following recommended components if desired:
    • Documentation – Lets you look up API info offline from within Eclipse
    • Samples – Source code to learn from for each version of the platform.
    • Usb Driver (Windows only) – Needed for debugging on hardware device
  • Verify and accept the components you want and click Install Accepted. The components will now be installed into your existing Android SDK directories.

New platforms are automatically saved into the <sdk>/platforms/ directory of your SDK; new add-ons are saved in the <sdk>/add-ons/ directory; samples are saved in the <sdk>/samples/android-<level>/; and new documentation is saved in the existing <sdk>/docs/ directory (old docs are replaced).

You’re now all set to start Android development!

Tips and Further Learning

The best way to learn Android Development is by doing and reading code. Read lots of code and try to understand how it works, try it yourself and make modifications. As Android is an open source platform there is a great deal of code out there online that you can browse through. This will be helpful as you think of ideas for your own projects. Here are some additional tips and resources:

  • Open the projects and look through the source code for the Android samples you downloaded above. There are various already built applications you can read through to understand how certain things are done in Android.
  • Find Google open source projects where you can read code for applications that have been published to the Android Marketplace.
  • Visit the Android developer’s website for the official development guide, articles, and more:
    http://developer.android.com
  • Watch Videos from Google on Android development:
    http://developer.android.com/videos/index.html#v=opZ69P-0Jbc
  • Participate in the Android developer’s Google Group:
    http://groups.google.com/group/android-developers
  • Join anddev.org, an Android Development Community that features tutorials, and forums:
    http://www.anddev.org
  • Ask and answer questions on Android development at Stack Overflow, just type Android and your topic in the search box:
    http://www.stackoverflow.com
  • There are some good books to help you get up to speed on Android development, here are some recommendations: