NavAppComponentsProvider

object NavAppComponentsProvider

A singleton used to access an instance of GlobalComponent for interaction with NavApp Components APIs, ensuring only a single instance of each component exists at a time.

This class should be used instead of manually instantiating a GlobalComponentManager.

Functions

Link copied to clipboard
fun createGlobalComponentManager(    lifecycleOwner: LifecycleOwner,     applicationContext: Context,     platformComponents: (ComponentProviderApi) -> List<ComponentInternalApi> = { val serviceProvider = applicationContext.iviApplication.getServiceProvider() listOf( IviVehiclePlatformComponent( VehicleSpecificationService.createApi(lifecycleOwner, serviceProvider), VehicleElectricEngineService.createApiOrNull(lifecycleOwner, serviceProvider) ) ) }): GlobalComponentManager

Creates an instance of the GlobalComponentManager.

Link copied to clipboard
@MainThread
fun getGlobalComponent(    lifecycleOwner: LifecycleOwner,     applicationContext: Context,     clientTag: String): GlobalComponent

Provides an instance of the NavApp GlobalComponent.