Datasheet

18
Part I: The Nuts and Bolts of Android
Most music players that can be downloaded from the Android Market run as
background services. This is how you can listen to music while checking your
e-mail or performing another task that requires the use of the screen.
Hardware Tools
Google exposes a plethora of functionality in Android, thus giving developers
(even the independent guys) the tools needed to create top-notch, full-
featured mobile apps. Google has gone above and beyond by making it
simple to tap into and make use of all the devices’ available hardware.
To create a spectacular Android app, you should take advantage of all that
the hardware has to offer. Don’t get me wrong: If you have an idea for an app
that doesn’t need hardware assistance, that’s okay too.
Android phones come with several hardware features that you can use to
build your apps, as shown in Table 1-1.
Table 1-1 Android Device Hardware
Functionality Required Hardware
Where am I? GPS radio
Which way am I walking? Built-in compass
Is my phone facing up or down? Proximity sensor
Is my phone moving? Accelerometer
Can I use my Bluetooth headphones? Bluetooth radio
How do I record video? Camera
Most Android phones are released with the hardware that I discuss in the
following sections, but not all devices are created equal. Android is free for
hardware manufacturers to distribute, so it’s used in a wide range of devices,
including some made by small manufacturers overseas (and it’s not uncom-
mon for some of these phones to be missing a feature or two).
Also, as the technology advances, phone manufacturers are starting to add
features that aren’t yet natively supported by Android. But don’t worry; man-
ufacturers that add hardware usually offer a software development kit (SDK)
that lets developers tap into the device’s unique feature. At this writing,
HTC’s Evo 4G, available from Sprint, is the only Android phone that comes
05_9780470770184-ch01.indd 1805_9780470770184-ch01.indd 18 11/2/10 8:51 AM11/2/10 8:51 AM