Working with Third Party Services and Applications

The built-in LBS features of the Android SDK are located in the android.location package. Basic LBS functionality, such as getting a location fix from satellite triangulation, is built into the Android SDK. However, many of the most interesting and powerful mapping and LBS-related features on Android phones are not actually built into the basic Android SDK but are part of the Google APIs that ship along with the Android SDK.

Working with Google APIs and Advanced Map Features

Map features can be built into applications using the Google API add-on. The following are some of the features available in the com.google.android.maps package:

► A MapView control for displaying an interactive map within a layout

► A MapActivity class to simplify MapView controls on a screen

► The GeoPoint class, which encapsulates position information

► Classes to support map overlays (drawing on top of the map)

► Classes for working with position projections and handling other common LBS-related tasks

For some Google APIs and features, you must sign up for a special account, agree to further terms of service, and receive an API key to use those services. These features are exciting and powerful, but they are unfortunately beyond the scope of this book. Once you have mastered the basics of Android LBS support, consider consulting a more advanced Android manual, such as our book Android Wireless Application Development (Addison-Wesley Developer's Library), which contains extensive examples using the Google APIs. You can read more about these classes at the Google APIs Add-On Reference website: http://code.google.com/android/add-ons/google-apis/reference/index.html.

0 0

Post a comment