Configuration

constructor(context: Context, hybridNavigationDataStore: HybridNavigationDataStore, locationProvider: LocationProvider, onlineRoutePlanner: RoutePlanner, offlineRoutePlanner: RoutePlanner, vehicleProvider: VehicleProvider = VehicleProviderFactory.create(), betterProposalAcceptanceMode: BetterProposalAcceptanceMode = BetterProposalAcceptanceMode.Automatic, deviationReplanningMode: DeviationReplanningMode = DeviationReplanningMode.Automatic)

Basic configuration used to set up Navigation SDK to work in hybrid mode.

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

context

The application context. Initializes Android dependencies.

locationProvider

Informs navigation of location updates.

hybridNavigationDataStore

Hybrid data store. Provides online tile data and offline map data.

onlineRoutePlanner

Used to update the active RoutePlan or to replan after deviation in online mode.

offlineRoutePlanner

Used to update the active RoutePlan or to replan after deviation in offline mode.

vehicleProvider

Enables navigation to listen to the changes of the vehicle state. Information from VehicleProvider.vehicle is leveraged by the HorizonEngine to provide the relevant virtual horizon. Additionally, it is used as a request parameter for route replannings during the navigation session. Notably, it supersedes any vehicle information specified in the RoutePlan.routePlanningOptions whether at the navigation start, or during any subsequent automatic or manual route replanning events. If it's not provided, an instance created by VehicleProviderFactory.create is used.

betterProposalAcceptanceMode

Specifies how better route proposals are applied during navigation. If it's not provided, the mode is set to BetterProposalAcceptanceMode.Automatic

deviationReplanningMode

Defines whether navigation should try to replan the active RoutePlan after deviation. If it's not provided, the deviation replanning mode is set to DeviationReplanningMode.Automatic.


constructor(context: Context, hybridNavigationDataStore: HybridNavigationDataStore, locationProvider: LocationProvider, onlineRoutePlanner: RoutePlanner? = null, offlineRoutePlanner: RoutePlanner? = null, vehicleProvider: VehicleProvider = VehicleProviderFactory.create(), betterProposalAcceptanceMode: BetterProposalAcceptanceMode = BetterProposalAcceptanceMode.Automatic, deviationReplanningMode: DeviationReplanningMode = DeviationReplanningMode.Automatic, replanningRetryPolicy: ReplanningRetryPolicy = ReplanningRetryPolicyFactory.create(), routeReplanningEngine: RouteReplanningEngine? = null, dataStoreMaintenanceEngine: DataStoreMaintenanceEngine? = null, dataStoreSelectionEngine: DataStoreSelectionEngine? = null, guidanceEngine: GuidanceEngine? = null, horizonEngine: HorizonEngine? = null, mapMatchingEngine: MapMatchingEngine? = null, routeTrackingEngine: RouteTrackingEngine? = null, routeProgressEngine: RouteProgressEngine? = null, arrivalDetectionEngine: ArrivalDetectionEngine? = null, safetyLocationsConfiguration: SafetyLocationsConfiguration? = null, hazardsConfiguration: HazardsConfiguration? = null, traffic: Traffic? = null)

Advanced configuration used to set up Navigation SDK to work in hybrid mode.

At least one of the following properties or combinations of properties must be specified:

  • onlineRoutePlanner and offlineRoutePlanner

  • routeReplanningEngine

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

context

The application context. Initializes Android dependencies.

locationProvider

Informs navigation of location updates.

hybridNavigationDataStore

Hybrid data store. Provides online tile data and offline map data.

onlineRoutePlanner

Used to update the active RoutePlan or to replan after deviation in online mode.

offlineRoutePlanner

Used to update the active RoutePlan or to replan after deviation in offline mode.

vehicleProvider

Enables navigation to listen to the changes of the vehicle state. Information from VehicleProvider.vehicle is leveraged by the HorizonEngine to provide the relevant virtual horizon. Additionally, it is used as a request parameter for route replannings during the navigation session. Notably, it supersedes any vehicle information specified in the RoutePlan.routePlanningOptions whether at the navigation start, or during any subsequent automatic or manual route replanning events. If it's not provided, an instance created by VehicleProviderFactory.create is used.

betterProposalAcceptanceMode

Specifies how better route proposals are applied during navigation. If it's not provided, the mode is set to BetterProposalAcceptanceMode.Automatic

deviationReplanningMode

Defines whether navigation should try to replan the active RoutePlan after deviation. If it's not provided, the deviation replanning mode is set to DeviationReplanningMode.Automatic.

replanningRetryPolicy

Specifies how to handle requests which failed during replanning of a Route. If it's not provided, an instance of ReplanningRetryPolicyFactory.create is used.

routeReplanningEngine

Engine responsible for replanning a route during navigation. If it's not provided, an instance of RouteReplanningEngineFactory.create is used, with RouteReplanner created from HybridRouteReplannerFactory.create

dataStoreMaintenanceEngine

Engine responsible for instantiating updates of the data store. If it's not provided, an instance created by DataStoreMaintenanceEngineFactory.create is used, with hybridNavigationDataStore as UpdatableDataStore parameter. Note that if NdsMapContext.updater is null, the offline map data will not be updated.

dataStoreSelectionEngine

Engine responsible for deciding what navigation data store will be used in the next navigation cycle. If it's not provided, an instance created by DefaultDataStoreSelectionEngineFactory is used (in OfflineFirst mode).

guidanceEngine

Engine responsible for generating guidance instructions of the upcoming road maneuvers. If it's not provided, an instance created by GuidanceEngineFactory.createDynamicGuidanceEngine is used.

horizonEngine

Engine responsible for providing location context data extending beyond the driver's visible horizon.

mapMatchingEngine

Engine responsible for improving position accuracy by attempting to match it to the map or the route. If it's not provided, an instance created by HybridMapMatchingEngineFactory.create is used.

routeTrackingEngine

Engine responsible for detecting whether the routes are being followed or not. If it's not provided, an instance created by RouteTrackingEngineFactory.create is used.

routeProgressEngine

Engine responsible for determining the progress made along the current route. If it's not provided, an instance created by RouteProgressEngineFactory.create is used.

arrivalDetectionEngine

Engine responsible for deciding if the route's destination has been reached. If it's not provided, an instance created by DefaultArrivalDetectionEngineFactory.create is used.

safetyLocationsConfiguration

Configuration parameters for safety location data sources. If no configuration is specified, the horizon will not contain any safety location elements when online; after switching to offline, safety location from onboard map will be propagated. If a custom HorizonEngine is specified in the configuration, this parameter will be ignored.

hazardsConfiguration

Configuration parameters for hazard data sources. If no configuration is specified, the horizon will not contain any hazard elements. If a custom HorizonEngine is specified in the configuration, this parameter will be ignored.

traffic

Traffic Data Provider. If no traffic is specified, the horizon will not contain any traffic events. If a custom HorizonEngine is specified in the configuration, this parameter will be ignored.

Throws

If neither routeReplanningEngine nor both onlineRoutePlanner and offlineRoutePlanner are specified.