What is "google-location-api"

Google Location Apis provide services that facilitate an application, implement, and automatically track location.

Google recommends its use in place of the Android framework android.Location, putting forward the following arguments:

  • Simpler and easier to use.
  • High precision.
  • Lower power consumption, choosing the most efficient way to get the location.

The API provides 3 modes/levels of use, depending on the needs of each application.

  • getLastLocation(GoogleApiClient) - When the application only wants to get the user’s location at a given time, usually in response to an action of yours, and does not need to monitor changes in location.

  • requestLocationUpdates(Googleapiclient,Locationrequest, Locationlistener) - If the app wants to monitor location changes.
    The API calls the method onLocationChanged() of the argument LocationListener to notify the application. The accuracy and frequency of notifications are set using the argument properties LocationRequest.

  • Geofencingrequest.Builder - If the application wishes to be notified when the user enters within a certain area(s). During the construction of the object Geofencingrequest the list of areas to be monitored, constructed using a Geofence.Builder.

Official documentation.