ReplayHistorySession
Testing and previewing the navigation experience is an important part of building with the Navigation SDK. You can use the SDK's replay functionality to go back in time and replay real experiences.
The ReplayHistorySession will push the history events into the MapboxReplayer. Some customizations can found in the ReplayHistorySessionOptions. In order to record history files refer to the MapboxHistoryRecorder.
Typically you would save a history file to a registry, and then select history files to replay in order to improve or demo an experience. But for the sake of example, this is how you would replay an experience that just happened.
mapboxNavigation.historyRecorder.stopRecording { historyFile ->
historyFile?.let {
replayHistorySession.setHistoryFile(historyFile)
replayHistorySession.onAttached(mapboxNavigation)
}
}
Constructors
Functions
Allows you to get or observe the ReplayHistorySessionOptions.
Signals that the mapboxNavigation instance is ready for use.
Signals that the mapboxNavigation instance is being detached.
Change the history file to replay, if changed after onAttached, the previous trip will be reset and the new file will start.
Update the ReplayHistorySessionOptions.