RouteTrackingStateUpdatedListener
Used to inform the caller that the route tracking stage has been updated.
The RouteTrackingState consists of two lists of routes: one for routes that have been followed and another for routes that have not been followed.
The RouteTrackingState is updated with each location update.
In order to listen to RouteTrackingState updates, implement this interface to create a listener, for instance:
val routeTrackingStateUpdatedListener = RouteTrackingStateUpdatedListener { routeTrackingState ->
// Implement the necessary functionality for handling the updated route tracking state
}Subsequently, add this listener using TomTomNavigation.addRouteTrackingStateUpdatedListener. To stop listening to the route tracking states updates, remove the listener using TomTomNavigation.removeRouteTrackingStateUpdatedListener.
This listener can also be utilized to inform the end user when navigation doesn't have the required map data to continue navigating on the route. In this case, all RouteTrackingState.unfollowedRoutes would have UnfollowedRoute.reason set to UnfollowedRouteReason.IncompleteMapData. The action that the user should take is to get back online to download the missing map data or to install an offline map for that region.
Functions
Called whenever RouteTrackingState has been updated.