ptg
2
Chapter 1 Overview of Android
platforms and OS updates is also a consideration.This mostly works as long as the devel-
oper is well aware of this systematic approach.The generic Application Programming
Interfaces (API) that Android offers and how to ensure device and OS compatibility are
main threads discussed throughout this book.
Still, as with any embedded platform, extensive testing of applications is required.
Google provides assistance to third-party developers in many forms as Android Develop-
ment Tool (ADT) plugins for Eclipse (also as standalone tools) including real-time log-
ging capabilities, a realistic emulator that runs native ARM code, and in-field error reports
from users to developers of Android Market applications.
The Dichotomy of Android
Android has some interesting dichotomies. Knowing about them upfront is useful not
only in understanding what Android is, but what it is not.
Android is an embedded OS that relies on the Linux kernel for core system services,
but it is not embedded Linux. For example, standard Linux utilities such as X-windows
and GNU C libraries are not supported.Writing applications for Android utilizes the
Java framework, but it is not Java. Standard Java libraries such as Swing are not sup-
ported. Other libraries such as Timer are not preferred; they have been replaced by
Android’s own libraries, which are optimized for usage in a resource-constrained,
embedded environment.
The Android OS is open source, which means developers can view and use any of the
system source code, including the radio stack.This source code is one of the first
resources for seeing examples of Android code in action, and it helps clarify the usage
when documentation is lacking.This also means developers can utilize the system in the
same way as any core application and can swap out system components for their own
components. However,Android devices do contain some proprietary software that is
inaccessible to developers (such as Global Positioning System (GPS) navigation).
A final dichotomy of Android OS is that Google is also backing Chrome OS.Android
OS is built for embedded platforms, and Chrome OS is built for cloud-based platforms.
However, which is the best choice for embedded devices that live in the cloud? Net-
books, which fill the gap between smart phones and laptop computers, could presumably
go either way (and they have). Android has started to utilize the cloud more. Does that
mean Chrome OS’s days are numbered? Google also backs a web-based market, so
Chrome OS enjoys the same developer leverage that Android currently has.This points to
a convergence that might have been in the cards all along.
Devices Running Android
There are more than 40 Android phones in the market from more than ten manufactur-
ers. Other hardware also runs Android, such as tablets and televisions. Software can access
information on the target device using the android.os.Build class, for example:
if(android.os.Build.MODEL.equals("Nexus+One")) { ... }
Download at www.wowebook.com