Navigator.RouteChangedListener

  • Navigator.RouteChangedListener provides methods that are invoked when navigation routes are altered.

  • Triggers for these methods include route generation, deviations, alternative route selections, route improvements, navigation starts, waypoint progression, and route clearance.

  • Implement the onRouteChanged() method to receive notifications about route changes, accessing the updated route details via route segment methods.

public static interface Navigator.RouteChangedListener

Defines signatures for methods that are called when the route changes. All notifications will occur on the UI thread.

Note that there are several types of triggers for this listener, including but not limited to:

  • the route was generated
  • the driver diverged from the current route
  • the driver selected an alternative route from the UI (before or after starting navigation)
  • the driver was offered or required to use a better route
  • the driver started navigating to a destination (via a call to Navigator.startGuidance())
  • the driver started navigating to a new waypoint after arriving at a previous one (via a call to Navigator.continueToNextDestination())
  • the route was cleared (via a call to Navigator.clearDestinations())

Public Method Summary

abstract void
onRouteChanged()
Called when the route changes.

Public Methods

public abstract void onRouteChanged ()

Called when the route changes. The new route is available through the route segment methods.