Used for receiving notifications from the FusedLocationProviderApi
when the device location has changed or can no longer be determined. The methods are called
if the LocationCallback
has been registered with the location client using the
FusedLocationProviderApi.requestLocationUpdates(GoogleApiClient, LocationRequest,
LocationCallback, Looper) method.
| void |
onLocationAvailability(LocationAvailability
locationAvailability)
Called when there is a change in the availability of location data.
|
| void |
Called when there is a change in the availability of location data.
When
LocationAvailability.isLocationAvailable() returns false you
can assume that location will not be returned in
onLocationResult(LocationResult) until something changes in the device's
settings or environment. Even when
LocationAvailability.isLocationAvailable() returns true the
onLocationResult(LocationResult) may not always be called regularly, however
the device location is known and both the most recently delivered location and
FusedLocationProviderApi.getLastLocation(GoogleApiClient) will be reasonably
up to date given the hints specified by the active LocationRequests.
| locationAvailability | The current status of location availability. |
|---|
Called when device location information is available.
The most recent location returned by
LocationResult.getLastLocation() is not guaranteed to be immediately fresh,
but will be reasonably up to date given the hints specified by the active
LocationRequests.
| result | The latest location result available. |
|---|