Datasheet

19
Chapter 1: Developing Spectacular Android Applications
with a front-facing camera. Because this device is the first of its kind, Sprint
has released an SDK that developers can use to access this cool new feature,
as well as sample code that lets them implement the feature easily.
Android devices come in all shapes and sizes: phones, tablet computers, and
e-book readers. You will find many other implementations of Android in the
future, such as Google TV — an Android-powered home appliance — as well
as cars with built-in Android-powered touchscreen computers. The engineers
behind Android provide tools that let you easily deploy apps for multiple
screen sizes and resolutions. Don’t worry — the Android team has done all
the hard work for you. I cover the basics of screen sizes and densities in
Chapter 4.
Touchscreen
Android phones have touchscreens, a fact that opens a ton of possibilities
and can enhance users’ interaction with your apps. Users can swipe, flip,
drag, and pinch to zoom, for example, by moving a finger or fingers on the
touchscreen. You can even use custom gestures for your app, which opens
even more possibilities.
Android also supports multitouch, which means that the entire screen is
touchable by more than one finger at a time.
Hardware buttons are old news. You can place buttons of any shape any-
where on the screen to create the UI that’s best suited for your app.
GPS
The Android OS combined with a phone’s GPS radio allows developers to
access a user’s location at any given moment. You can track a user’s move-
ment as she changes locations. The Foursquare social-networking app is
a good example; it uses GPS to determine the phone’s location and then
accesses the Web to determine which establishment or public place the user
is in or near.
Another great example is the Maps application’s ability to pinpoint your loca-
tion on a map and provide directions to your destination. Android combined
with GPS hardware gives you access to the phone’s exact GPS location. Many
apps use this functionality to show you where the nearest gas station, coffee-
house, or even restroom is located. You can even use the maps API to pin-
point the user’s current location on a map.
05_9780470770184-ch01.indd 1905_9780470770184-ch01.indd 19 11/2/10 8:51 AM11/2/10 8:51 AM