WaypointArrivalListener

Used to inform the caller that the WaypointState has been changed during navigation.

The WaypointState changes are detected by the ArrivalDetectionEngine. When notified, the listener can indicate two different states of waypoint arrival experience:

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

val waypointArrivalListener = object : WaypointArrivalListener {
override fun onWaypointArrived(waypoint: RouteStop, route: Route) {
// Implement the necessary functionality for handling the waypoint arrival detection
}
override fun onWaypointDeparted(waypoint: RouteStop, route: Route) {
// Implement the necessary functionality for handling the waypoint departure detection
}
}

Subsequently, add this listener using TomTomNavigation.addWaypointArrivalListener. To stop listening to the WaypointState changes, remove the listener using TomTomNavigation.removeWaypointArrivalListener.

Functions

Link copied to clipboard
abstract fun onWaypointArrived(waypoint: RouteStop, route: Route)

Called whenever a waypoint has been arrived at. It marks the start of the waypoint arrival experience.

Link copied to clipboard
abstract fun onWaypointDeparted(waypoint: RouteStop, route: Route)

Called whenever a waypoint has been departed from. It marks the end of the waypoint arrival experience.