12. Location-Based Services

Location-based services (LBSs) enable some of the most popular mobile applications. Location can be integrated with many functions, such as Internet searching, picture taking, gaming, and social networking. Developers can leverage the available location technology to make their applications more relevant and local.

This chapter introduces methods to obtain the device’s location and then track, geocode, and map it. In addition, there are recipes for overlaying the map with markers and views.

Location Basics

An application requires the following to access the location services from the Android system:

Image LocationManager ...

Get The Android™ Developer’s Cookbook: Building Applications with the Android SDK, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.