MapboxTripStarter
The MapboxTripStarter makes it simpler to switch between a trip session and replay.
This is not able to observe when location permissions change, so you may need to refresh the state with refreshLocationPermissions. Location permissions are not required for replay.
There should be one instance of this class at a time. For example, an app Activity and car Session will need to use the same instance. That will be done automatically if you use getRegisteredInstance.
Types
Functions
This is the default mode for the MapboxTripStarter. This can be used to disable enableReplayRoute. Make sure location permissions have been accepted or this will have no effect on the experience.
Enables a mode where history files will be replayed. Set an absolute path to the history file in the options. Use MapboxNavigation.historyRecorder to get an instance of the MapboxHistoryRecorder to record a history file.
Enables a mode where the primary route is simulated by an artificial driver. Set the route with MapboxNavigation.setNavigationRoutes. Can be used with getReplayRouteSessionOptions to make minor adjustments to the current options.
Get the current ReplayHistorySessionOptions. This can be used with enableReplayHistory to make minor adjustments to the current options.
Get the current ReplayRouteSessionOptions. This can be used with enableReplayRoute to make minor adjustments to the current options.
Signals that the mapboxNavigation instance is ready for use.
Signals that the mapboxNavigation instance is being detached.
enableMapMatching will not work unless location permissions have been granted. Refresh the location permissions after they are granted to ensure the trip session will start.