createDefault

fun createDefault(lifecycleOwner: LifecycleOwner, iviServiceProvider: IviInstanceBoundIviServiceProvider, frontendMetadata: Collection<FrontendMetadata>, frontendContextFactory: FrontendContextFactory, panelRegistryFactory: PanelRegistryFactory<IviPanelRegistry> = { frontendRegistry -> IviPanelRegistry.build( frontendRegistry.extractPanels(), lifecycleOwner, iviServiceProvider ) }, frontendCoordinationRulesFactory: FrontendCoordinationRulesFactory<IviPanelRegistry> = { frontendRegistry, panelRegistry -> DefaultFrontendCoordinationRules.create(frontendRegistry, panelRegistry) }): FrontendCoordinator<IviPanelRegistry>

Creates a default instance of FrontendCoordinator using an IviPanelRegistry.

For system UIs similar to TomTom Digital Cockpit's stock system UI this is recommended to use. For system UIs that offer different types of panels and thus have a different type of PanelRegistry, the regular FrontendCoordinator constructor can be used instead.

Parameters

lifecycleOwner

The lifecycle during which the coordinator is active.

iviServiceProvider

The service provider to use communicate with various services, such as the main menu and notification display services.

frontendMetadata

The metadata about the frontends that this instance should coordinate.

frontendContextFactory

The factory used to create FrontendContexts when creating Frontends.

panelRegistryFactory

A factory for the coordinator to create a PanelRegistry

frontendCoordinationRulesFactory

A factory for the coordinator to create and activate a set of FrontendCoordinationRules.