Informs the caller that the active route has changed. The active route is the only route that is being followed for which the navigation provides guidance.

The active route is changed when:

To listen for active route changes, first implement the interface below to create the listener:

val activeRouteChangedListener = ActiveRouteChangedListener { route ->
// add code here that handles the active route being changed

Then register this listener using TomTomNavigation.addActiveRouteChangedListener. To stop listening to active route changes, unregister the listener using TomTomNavigation.removeActiveRouteChangedListener.

The ActiveRouteChangedListener is called post the addition of the new route to the navigation and prior to the removal of the old active route. Hence, it is called after the RouteAddedListener and before the RouteRemovedListener.

Important: This is a Public Preview API. It may be changed or removed at any time.


Link copied to clipboard
abstract fun onActiveRouteChanged(route: Route)

Called when the active route has changed.