RouteRemovedListener

fun interface RouteRemovedListener

Used to inform the caller that the active or proposed route has been removed from the navigation session.

The active route is removed from the session when:

The proposed route is removed from the session when:

In order to listen to the route being removed from the session, implement this interface to create a listener, for instance:

val routeRemovedListener = RouteRemovedListener { route, reason ->
// Implement the necessary functionality for handling the route being removed from the session
}

Subsequently, add this listener using TomTomNavigation.addRouteRemovedListener. To stop listening to the route being removed from the session, remove the listener using TomTomNavigation.removeRouteRemovedListener.

The complementary listener that provides updates on the addition of routes to the session is RouteAddedListener. Note, during navigation in the turn by turn mode there will always be one active route. Therefore, any removal of the current active route will always be preceded by an ActiveRouteChangedListener call, with details of the new active route.

Functions

Link copied to clipboard
abstract fun onRouteRemoved(route: Route, reason: RouteRemovedReason)

Called whenever a route has been removed from the navigation session.