WaypointArrivalListener

Notifies the caller of changes to the WaypointState during navigation.

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

To listen to the WaypointState 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 WaypointState 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.