WaypointArrivalListener

Informs the caller about waypoint arrival state changes during navigation.

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

To listen to waypoint arrival state changes while navigating, first implement this interface to create a listener, for example:

val waypointArrivalListener = object : WaypointArrivalListener {
override fun onWaypointArrived(waypoint: RouteStop, route: Route) {
// add code here that handles the waypoint arrival
}
override fun onWaypointDeparted(waypoint: RouteStop, route: Route) {
// add code here that handles the waypoint departure
}
}

Then add this listener using TomTomNavigation.addWaypointArrivalListener.

To stop listening to the waypoint arrival state changes, remove the listener using TomTomNavigation.removeWaypointArrivalListener.

Functions

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

Called when arrived at the given waypoint. It marks the start of the waypoint arrival experience.

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

Called when departed from the given waypoint. It marks the end of the waypoint arrival experience.