Page Summary
-
RoadSnappedLocationProvider.GpsAvailabilityEnhancedLocationListeneris an interface extendingRoadSnappedLocationProvider.LocationListenerto include GPS availability updates. -
It provides a callback,
onGpsAvailabilityUpdate, triggered when the GPS signal availability changes, indicating whether GPS is available for navigation. -
This API is considered experimental and might be subject to changes or removal in future releases.
-
onGpsAvailabilityUpdateprovides information about the transitions in GPS signal, indicating whether the GPS signal is currently available or unavailable. -
It inherits methods from
RoadSnappedLocationProvider.LocationListenerlikeonLocationChangedandonRawLocationUpdatefor location updates.
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 |
onGpsAvailabilityChange(GpsAvailabilityChangeEvent event)
Called when the availability of the GPS signal has changed.
|
| abstract void |
onGpsAvailabilityUpdate(boolean isGpsAvailable)
This method is deprecated.
Use
onGpsAvailabilityChange(GpsAvailabilityChangeEvent) instead.
|
Inherited Method Summary
Public Methods
public abstract void onGpsAvailabilityChange (GpsAvailabilityChangeEvent event)
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. If the listener is registered after the first transition into the searching state, it will be immediately notified of the current state.
Parameters
| event | details about the GPS availability change |
|---|
public abstract void onGpsAvailabilityUpdate (boolean isGpsAvailable)
This method is deprecated.
Use onGpsAvailabilityChange(GpsAvailabilityChangeEvent) instead.
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 |
|---|