LocationContextUpdatedListener
Interface to location context update listeners. Used to receive location context update events during navigation.
To listen to location context updates, first implement this interface to create a listener, for example:
val locationContextUpdatedListener = object : LocationContextUpdatedListener {
override onLocationContextUpdated(locationContext: LocationContext) {
// add code here that handles the location context update
}
}
Content copied to clipboard
Then, add the listener you created with the TomTomNavigation object, using addLocationContextUpdatedListener:
tomTomNavigation.addLocationContextUpdatedListener(locationContextUpdatedListener)
Content copied to clipboard
To stop listening to location context updates, remove the listener using removeLocationContextUpdatedListener:
tomTomNavigation.removeLocationContextUpdatedListener(locationContextUpdatedListener)
Content copied to clipboard
Functions
Link copied to clipboard
Called when LocationContext data becomes available.