LaneGuidanceUpdatedListener

Informs the caller about changes in lane guidance. This interface provides listeners for when lane guidance starts and ends.

The LaneGuidanceUpdatedListener interface provides the methods that are called when lane guidance shall appear and disappear, respectively. These methods facilitate efficient and dynamic update of lane guidance information during a journey.

Note: To ensure these methods are called, the Route passed to TomTomNavigation must contain valid LaneSections. This code is used within the context of a navigation system where lane guidance is crucial for the user experience and journey accuracy.

To listen to the lane guidance changes, first implement this interface to create a listener, for example:

val laneGuidanceUpdatedListener = object : LaneGuidanceUpdatedListener {
override fun onLaneGuidanceStarted(laneGuidance: LaneGuidance) {
// add code here that handles the lane guidance starting
}
override fun onLaneGuidanceEnded(laneGuidance: LaneGuidance) {
// add code here that handles the lane guidance ending
}
}

Then add this listener using TomTomNavigation.addLaneGuidanceUpdatedListener. To stop listening to the lane guidance changes, remove the listener using TomTomNavigation.removeLaneGuidanceUpdatedListener.

Functions

Link copied to clipboard
abstract fun onLaneGuidanceEnded(laneGuidance: LaneGuidance)

Called when current lane guidance ends.

Link copied to clipboard
abstract fun onLaneGuidanceStarted(laneGuidance: LaneGuidance)

Called when new lane guidance appears.