Chapter 13. Getting Location and Using Geofencing

In this chapter, we will cover the following topics:

  • How to get the last location
  • Resolving problems reported with the GoogleApiClient OnConnectionFailedListener
  • How to receive location updates
  • Create and monitor a Geofence

Introduction

Location awareness offers many benefits to an app, so many in fact that even desktop apps now attempt to get the user's location. Location uses ranges from turn-by-turn directions, "find the nearest" applications, alerts based on location, and there are now even location-based games that get you out exploring with your device.

The Google APIs offer many rich features for creating location-aware applications and mapping features. Our first recipe How to get the last location ...

Get Android Application Development Cookbook - 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.