A Developer's First Look At: Android
A Developer's First Look At: Android
A Developer's First Look At: Android
Overview
Android
Look into the insides of Android from a developers point of view, and youll probably conclude that the only limitation could be your imagination.
ndroid is a software stack for mobile devices that includes an operating system, middleware and key applications. Most of you may already be aware of Android, its capabilities and other aspects. (Please refer to the article, Linux May Put the Desktop In Your Pocket published in the December issue of LFY). In this article, we shall take a brief look at Android from the developers point of view.
mobile application.
Application framework
Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of components; the capabilities of any application can be published and then be made use of by any other application (subject to security constraints enforced by the framework). This same mechanism allows components to be replaced by the user. For example, if you have a small notetaking application on your mobile and want to search for a particular location whose address you have just noted down, you might consider using the maps application directly from your note-taking application, instead of switching applications.
The architecture
The various components of Android are designed as a stack, with the Applications forming the top layer of the stack, while the Linux kernel forms the lowest layer. Interesting! I hear you say, and it sure is.
Applications
Android ships with a set of core applications including an e-mail client, SMS program, calendar, maps, browser, contacts, and other features. All applications are written using the Java programming language. So, it is in this layer that you will fit in your next big
Libraries
Android includes a set of C/C++ libraries used by various components of the Android system. These capabilities are exposed to developers through the Android application framework.
48
JANUARY 2008
www.linuxforu.com
CMYK
Overview
Android runtime
Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language. Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in Figure 2: The Android emulator the Dalvik Executable (.dex) format, which is optimised for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that has been transformed into the .dex format by the included dx tool. Interested in knowing more about the .dex file format? Please refer to http://retrodev.com/android/ dexformat.html The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management.
www.linuxforu.com
JANUARY 2008
49
CMYK
Overview
ide intellij: creates project files for IntelliJ For Eclipse support, please use the ADT plugin.
and is the one-stop resource for complete information. One of the very first cool applications written for Android is WamF (http://blogoscoped.com/archive/2007-11-19n27.html), where the developer signs off: Android is an environment where the biggest limitation is your imagination. This droid is definitely cool!
50
JANUARY 2008
www.linuxforu.com
CMYK