Building Android Applications
To build an Android application, a developer has to be familiar with the Java programming language. Assuming the developer is proficient in Java, he or she can download the software developer kit (SDK) and get started. The SDK gives the developer access to Android's application programming interface (API).
The SDK includes several tools, including sample applications and a phone emulator. Emulators are programs that duplicate the features and functions of a specific system or device. The Android emulator is a program that duplicates the functions of a phone running on the Android platform. When the developer finishes building an application, he or she can test it out on the emulator to see how the app will perform on actual hardware.
Google provides an extensive Android tutorial on its developer Web site. The company even provides tips on basic programming steps like testing and debugging software. Experienced developers can skip over the tutorial and go straight to building an application. Google even provides step-by-step instructions on how to build an application named Hello World to give developers the chance to become familiar with Android's architecture.
This brings us to another feature of Android that sets it apart from the iPhone -- developers can create complex applications that run in the background of other applications. Apple limits iPhone applications to the foreground -- if you switch to a different application, the first application you were in stops working until you return to it. This feature limits the types of applications developers can build for the iPhone. Android allows developers more extensive access to background processes.
Google breaks down all applications into four basic building blocks (not all applications will have every building block):
- Activities: Whenever an application displays a screen to the user, that's an activity. For example, a map application could have a basic map screen, a trip planner screen and a route overlay screen. That's three activities.
- Intents: Intents are the mechanisms for moving from one activity to another. If you were to plot a trip using our example of the mapping application, an intent would interpret your input and activate the route overlay screen. Android also allows for broadcast intent receivers, which are intents triggered by external events like moving to a new location or an incoming phone call.
- Services: A service is a program that runs on its own without a user interface. For example, let's say you are participating in a Softrace event. Midway through the race, you decide you want to listen to music as you burn up the track. You can switch over to a media player application and start a song while Softrace continues to track your progress. If Softrace were simply an activity, you would have ended the application as soon as you switched to the media player.
- Content provider: A content provider allows an application to share information with other applications. This allows developers to work together to create a suite of applications that are more robust and complex than each individual component.
There are other considerations developers must keep in mind while building applications. They include Android's graphics rendering engine, process management software, user interface support and other technical details. Google provides guides for all of these elements on its Android developer Web site.
The journey of the Google Phone has not always been a smooth one. Some vendors have been quick to accept the OS, while others have dismissed it. Let's take a look at who is and who isn't thrilled about Android.