public interface NavigationProgressListener
|Modifier and Type||Method and Description|
Called when the user reaches one of the destinations on their route.
Called when a location update is received while in a state where it cannot be adequately determined whether the user is on- or off-route, due to a recent history of location updates with poor accuracy.
Called when the user's progress along the route has been updated.
void onLocationObservationReceived(LocationObservation locationObservation)
LocationProviderAdapterused by the
Note that a
LocationObservation contains both the location's raw GPS coordinates, the "snapped" (adjusted)
location coordinates, as well as a few other utility values -- such as the distance to the next upcoming manuever,
as well as the remaining distance to travel on the current route-leg -- see
locationObservation- the location observation containing both a "raw" GPS location, the "snapped" location, etc.
void onUpcomingManeuverUpdated(Maneuver upcomingManeuver)
void onDestinationReached(boolean isFinalDestination, RouteLeg routeLegCompleted)
isFinalDestinationis true, then
routeLegCompletedis the last route leg completed.
If the client wishes to show a dialog to the user when they've reached an intermediate destination
(e.g. "Continue Navigation? Or Pause?"), then they can simply check if
isFinalDestination is false,
NavigationManager.pauseNavigation() to pause the session. Then, when the user wishes to resume
navigating, simply call
void onInaccurateObservationReceived(Location location)