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
}
}

Then, add the listener you created with the TomTomNavigation object, using addLocationContextUpdatedListener:

tomTomNavigation.addLocationContextUpdatedListener(locationContextUpdatedListener)

To stop listening to location context updates, remove the listener using removeLocationContextUpdatedListener:

tomTomNavigation.removeLocationContextUpdatedListener(locationContextUpdatedListener)

Functions

Link copied to clipboard
abstract fun onLocationContextUpdated(locationContext: LocationContext)

Called when LocationContext data becomes available.