How Android works: The big picture

Summary:Some parts of Android will be familiar, such as the Linux Kernel, OpenGL, and the SQL database. Others may be completely foreign, such as Android's idea of the application life cycle. You'll need a good understanding of these key concepts in order to write well-behaved Android applications. Let's start off by taking a look at the overall system architecture--the key layers and components that make up the Android stack. Excerpted from an upcoming book.

[This article is part of a continuing series on Android, Google's new mobile phone platform. It is excerpted from an upcoming book. --Ed]

Some parts of Android will be familiar, such as the Linux Kernel, OpenGL, and the SQL database. Others may be completely foreign, such as Android's idea of the application life cycle. You'll need a good understanding of these key concepts in order to write well-behaved Android applications.

[ READ: More articles on Android ]

Let's start off by taking a look at the overall system architecture--the key layers and components that make up the Android stack. The following diagram (courtesy of Google) shows the "20,000 foot" view of Android:

How Android works: The big picture

Starting at the bottom is the Linux Kernel. Android uses Linux for its device drivers, memory management, process management, and networking. However you will never be programming to this layer directly.

The next level up contains the Android native libraries. They are all written in C/C++ internally, but you'll be calling them through Java interfaces. In this layer you can find the Surface Manager (for compositing windows), 2D and 3D graphics, Media codecs (MPEG-4, H.264, MP3, etc.), the SQL database (SQLite), and a native web browser engine (WebKit).

Next is the Android runtime, including the Dalvik Virtual Machine. Dalvik runs dex files, which are coverted at compile time from standard class and jar files. Dex files are more compact and efficient than class files, an important consideration for the limited memory and battery powered devices that Android targets.

The core Java libraries are also part of the Android runtime. They are written in Java, as is everything above this layer. Here, Android provides a substantial subset of the Java 5 Standard Edition packages, including Collections, I/O, and so forth.

The next level up is the Application Framework layer. Parts of this toolkit are provided by Google, and parts are extensions or services that you write. The most important component of the framework is the Activity Manager, which manages the life cycle of applications and a common "back-stack" for user navigation.

Finally, the top layer is the Applications layer. Most of your code will live here, along side built-in applications such as the Phone and Web Browser.

One of the unique and powerful qualities of Android is that all applications have a level playing field. What I mean is that the applications Google writes have to go through the same public API that you use. You can even tell Android to make your application replace the standard applications if you like.

In the next installment we'll take take a closer look at the components in the Android Application Framework.

Related articles:

Did you find this article helpful? Have a suggestion? Leave a comment and let me know.

Topics: Operating Systems, Android, Google, Linux, Open Source, Software, Software Development

About

Ed Burnette has been hooked on computers ever since he laid eyes on a TRS-80 in the local Radio Shack. Since graduating from NC State University he has programmed everything from serial device drivers and debuggers to web servers. After a delightful break working on commercial video games, Ed reluctantly returned to business software. He... Full Bio

zdnet_core.socialButton.googleLabel Contact Disclosure

Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.

Related Stories

The best of ZDNet, delivered

You have been successfully signed up. To sign up for more newsletters or to manage your account, visit the Newsletter Subscription Center.
Subscription failed.