O'Reilly logo

Learning Android Google Maps by Raj Amal W.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with the Google Play services Location API

We already looked at the features of Google Play services. Let's see some of the initial steps before we proceed:

  • Make sure you have set up Google Play services for our Android project
  • Check whether you have added the suitable permissions required

Getting the last known location

Using the Google Play services Location API, we can also request the last known location of the device. In most cases, the current location will be equal to the last known location.

We use the fused location provider to retrieve the last known location. It is present in Google Play services. It provides a simple API and it also helps in optimizing the device's battery power.

We must implement the GoogleApiClient.ConnectionCallbacks ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required