RouteUpdatedListener
Used to inform the caller that a route has been updated.
The current route is updated under the following circumstances:
When the route data is refreshed with data from the replanned route.
When instructions and lane guidance are incrementally updated for the current route.
In order to listen to the route updates, implement this interface to create a listener, for instance:
val routeUpdatedListener = RouteUpdatedListener { route, reason ->
// Implement the necessary functionality for handling the updated route
}
Subsequently, add this listener using TomTomNavigation.addRouteUpdatedListener. To stop listening to the route updates, remove the listener using TomTomNavigation.removeRouteUpdatedListener.
Please note that the RouteUpdatedListener is triggered only when the route is updated. It means that the route geometry is preserved. When the route update happens the active route does not change, therefore the ActiveRouteChangedListener is not called. To listen to the route changes that result in the geometry change, use the RouteAddedListener, RouteRemovedListener and ActiveRouteChangedListener. Note: The exception is when a proposed route is updated, its geometry is shortened in a way that removes previously traveled part up to the point where the replan is triggered. This exception causes new route progress updates to start from the updated route origin, which may require some adjustments.
Functions
Called whenever a Route has been successfully updated.