ReplayRouteSession
Used to create a replay trip session. Continue to use MapboxNavigation.setNavigationRoutes to decide the route that should be replayed.
Do not use this class with the ReplayProgressObserver. They will create conflicts with and the results are undefined.
The simulated driver from ReplayRouteSession will slow down to a stop depending ReplayRouteSessionOptions.decodeMinDistance. To remove this behavior you can set it to Double.MAX_VALUE, be aware that it will require more memory.
Use ReplayRouteSessionOptions for customizations. For example, this is how can update the location frequency.
replayRouteSession.setOptions(
replayRouteSession.getOptions().toBuilder()
.replayRouteOptions(
replayRouteSession.getOptions().replayRouteOptions.toBuilder()
.frequency(25.0)
.build()
)
.build()
)
Enable and disable the ReplayRouteSession with MapboxNavigation or MapboxNavigationApp. The replay session will be enabled when MapboxNavigation is attached.
Constructors
Functions
Get the options that are currently set. This can be used to change the options.
Signals that the mapboxNavigation instance is ready for use. Use this function to register mapboxNavigation observers, such as MapboxNavigation.registerRoutesObserver.
Signals that the mapboxNavigation instance is being detached. Use this function to unregister mapboxNavigation observers that were registered in onAttached.
Set new options for the ReplayRouteSession. This will not effect previously simulated events, the end behavior will depend on the values you have used. If you want to guarantee the effect of the options, you need to set options before MapboxNavigation is attached.