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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.