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,     additionalComponents: (GlobalComponent) -> List<ComponentInternalApi> = { val serviceProvider = applicationContext.iviApplication.getServiceProvider() listOf( IviSystemSettingsPlatformComponent( SystemSettingsService.createApiOrNull(lifecycleOwner, serviceProvider) ), IviAnalyticsPlatformComponent( AnalyticsSettingsService.createApi( lifecycleOwner, serviceProvider ) ), IviVehiclePlatformComponent( VehicleSpecificationService.createApi(lifecycleOwner, serviceProvider), VehicleElectricEngineService.createApiOrNull(lifecycleOwner, serviceProvider) ), DaggerSearchShortcutsPlatformComponentGraph.factory() .create(applicationContext, it.componentProviderApi()) .searchShortcutsPlatformComponentApi() as ComponentInternalApi ) }): GlobalComponentManager

Creates an instance of the GlobalComponentManager.

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

Provides an instance of the NavApp GlobalComponent.