NavigationStateChangedListener

Used to inform the caller that the NavigationState has been changed.

The navigation state changes when the navigation session is started, resumed, stopped, or updated from from free driving to active guidance. Also TomTomNavigation.navigationState can be used to get the current state of the navigation system. For more information on navigation states, see the NavigationState and TomTomNavigation.navigationState documentation.

In order to listen to the navigation state changes, implement this interface to create a listener, for instance:

val navigationStateChangedListener = NavigationStateChangedListener { navigationState ->
// Implement the necessary functionality for handling the navigation state change
}

Subsequently, add this listener using TomTomNavigation.addNavigationStateChangedListener. To stop listening to navigation state changes, remove the listener using TomTomNavigation.removeNavigationStateChangedListener.

Functions

Link copied to clipboard
abstract fun onNavigationStateChanged(navigationState: NavigationState)

Called whenever the navigation state has been changed. For more information on navigation states, see NavigationState.