RoadSnappedLocationProvider.GpsAvailabilityEnhancedLocationListener

public static interface RoadSnappedLocationProvider.GpsAvailabilityEnhancedLocationListener implements RoadSnappedLocationProvider.LocationListener

A location listener that also listens to the changes in GPS availability.

DISCLAIMER: This is an EXPERIMENTAL API and its behaviors may be subject to removal or breaking changes in future releases.

Register and unregister this class just like a RoadSnappedLocationProvider.LocationListener, using the methods RoadSnappedLocationProvider.addLocationListener(RoadSnappedLocationProvider.LocationListener) and RoadSnappedLocationProvider.removeLocationListener(RoadSnappedLocationProvider.LocationListener), respectively.

Inherited Constant Summary

Public Method Summary

abstract void
onGpsAvailabilityUpdate(boolean isGpsAvailable)
Called when the availability of the GPS signal has changed.

Inherited Method Summary

Public Methods

public abstract void onGpsAvailabilityUpdate (boolean isGpsAvailable)

Called when the availability of the GPS signal has changed.

DISCLAIMER: This is an EXPERIMENTAL API and its behaviors may be subject to removal or breaking changes in future releases.

This method reports transitions in the internal state machine for GPS availability. As it stands, the state machine only becomes active once GPS has stabilized. As a result, the first callback will be triggered when GPS has gone from "active" to "lost" - i.e., with an argument of `false`. Every subsequent invocation will represent an alternating transition from active to lost, to active and so forth.

What does "GPS availability" mean? It means that "sensors are in general good enough for navigation". For instance, it will return true if we enter a tunnel and we have enough other sensors available to be certain of location, even if GPS drops out.

Parameters
isGpsAvailable true if the GPS has transitioned into an "available" state from an "unavailable" state, false if the GPS has transitions from an "unavailable" state to an "available" state