Used to inform the caller when the NavigationState is 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.

To be informed of navigation state updates, implement this interface to create a listener, for example:

val navigationStateChangedListener = NavigationStateChangedListener { navigationState ->
// add code here that handles the navigation state being changed

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


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

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