HorizonUpdatedListener
Used to inform the caller that the horizon information has been updated .
In order to listen to the horizon updates while navigating, implement this interface to create a listener, for instance:
val horizonUpdatedListener = object : HorizonUpdatedListener {
override fun onSnapshotUpdated(options: HorizonOptions, snapshot: HorizonSnapshot) {
// Implement the necessary functionality for handling the horizon snapshot update
}
override fun onPositionUpdated(options: HorizonOptions, position: HorizonPosition) {
// Implement the necessary functionality for handling the horizon position update
}
}
Subsequently, add this listener using TomTomNavigation.addHorizonUpdatedListener: To stop listening to the horizon updates, remove the listener using TomTomNavigation.removeHorizonUpdatedListener:
Functions
Called whenever a horizon reset has occurred for a specific set of horizon options. The horizon is reset following a map update, a vehicle profile update, route update, or when the current input position does not belong to any of the existing horizon paths (for example, a jump to a new place).
Called whenever the horizon position has been updated for a specific set of horizon options.
Called whenever the horizon snapshot has been updated for a specific set of horizon options.