Datasheet

Introducing the Development Framework
13
the code documentation, Android’s reference documentation explains how to get started and
gives detailed explanations of the fundamentals behind Android development.
Sample code The Android SDK includes a selection of sample applications that demonstrate
some of the possibilities available with Android, as well as simple programs that highlight
how to use individual API features.
Online support Android has rapidly generated a vibrant developer community. The Google
Groups at
http://developer.android.com/resources/community-groups.html
are active
forums of Android developers with regular input from the Android engineering and developer
relations teams at Google. StackOverflow at
http://www.stackoverflow.com/questions/
tagged/android
has also become a popular destination for Android questions.
For those using the popular Eclipse IDE, Android has released a special plug-in that simplifies project
creation and tightly integrates Eclipse with the Android Emulator and debugging tools. The features of
the ADT plug-in are covered in more detail in Chapter 2.
Understanding the Android Software Stack
The Android software stack is composed of the elements shown in Figure 1-1 and described in further
detail after it. Put simply, a Linux kernel and a collection of C/C++ libraries are exposed through an
application framework that provides services for, and management of, the run time and applications.
Linux kernel Core services (including hardware drivers, process and memory management,
security, network, and power management) are handled by a Linux 2.6 kernel. The kernel
also provides an abstraction layer between the hardware and the remainder of the stack.
Libraries Running on top of the kernel, Android includes various C/C++core libraries such
as libc and SSL, as well as:
A media library for playback of audio and video media
A surface manager to provide display management
Graphics libraries that include SGL and OpenGL for 2D and 3D graphics
SQLite for native database support
SSL and WebKit for integrated web browser and Internet security
Android run time What makes an Android phone an Android phone rather than a mobile
Linux implementation is the Android run time. Including the core libraries and the Dalvik
virtual machine, the Android run time is the engine that powers your applications and, along
with the libraries, forms the basis for the application framework.
Core libraries While Android development is done in Java, Dalvik is not a Java
VM. The core Android libraries provide most of the functionality available in the
core Java libraries as well as the Android-specific libraries.
Dalvik virtual machine Dalvik is a register-based virtual machine that’s been opti-
mized to ensure that a device can run multiple instances efficiently. It relies on the
Linux kernel for threading and low-level memory management.