11. Working with Location Data

Many applications may benefit from adding support or processing location data. There are many examples of how location can be used and why it is important. In this chapter, you learn ways to access and use user location data.

At first glance, it may seem simple to work with location data. Most Android devices contain a GPS or similar sensor, so it may be easy to believe that by simply turning this sensor on you should have access to the data you want.

This, however, is not the case. A user may not wish to turn on their device sensors because it diminishes battery life and may not return a perceivable benefit. Some users may also not want their exact movements and locations recorded and will turn off all location ...

Get Android™ Development Patterns: Best Practices for Professional Developers 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.