startReplayTripSessionWithPermissionCheck
Functionally the same as startReplayTripSession but throws IllegalStateException if the application doesn't have permissions to start foreground service with location type.
Functionally the same as startTripSession except the locations do not come from the NavigationOptions.mockLocationProvider. The events are emitted by the mapboxReplayer.
This allows you to simulate navigation routes or replay history from the historyRecorder.
Parameters
Boolean if set to false, foreground service will not be started and no notifications will be rendered, and no location updates will be available while the app is in the background. Default value is set to true. To start foreground service your application needs to have required permissions. See FOREGROUND_SERVICE_TYPE_LOCATION documentation page for more information.
See also
Throws
if withForegroundService is true and the application doesn't have permissions to start foreground services with location type. See FOREGROUND_SERVICE_TYPE_LOCATION documentation page for more information.