SystemUiHostContext

data class SystemUiHostContext(val context: Context, val lifecycleOwner: LifecycleOwner, val iviInstanceId: IviInstanceId, val iviServiceProvider: IviInstanceBoundIviServiceProvider, val staticConfigurationProvider: StaticConfigurationProvider, val fragmentManager: FragmentManager, val viewModelStoreOwner: ViewModelStoreOwner, val frontendMetadata: Collection<FrontendMetadata>, val splashScreenProvider: SplashScreenProvider)

Information about the environment that a system UI host runs in and how it should present itself.

Parameters

context

The Context that the system UI lives in.

lifecycleOwner

The lifecycle to which the system UI is bound. It is not stopped or destroyed when a theme change triggers view recreation, so don't provide this LifecycleOwner to views that are recreated at that time. Use SystemUiHost.viewLifecycleOwner instead.

iviInstanceId

The ID for the IVI instance that this system UI instance operates in.

iviServiceProvider

Provides access to services.

staticConfigurationProvider

Allows retrieving the values of static configurations.

fragmentManager

Used for presenting panels' fragments.

viewModelStoreOwner

Used for managing the system UI's view model(s).

frontendMetadata

Specifies which Frontends the system UI should manage and present.

splashScreenProvider

Is used by the system UI to create a view used as a splash screen.

Constructors

Link copied to clipboard
constructor(fragmentActivity: FragmentActivity, iviInstanceId: IviInstanceId, frontendMetadata: Collection<FrontendMetadata>, splashScreenProvider: SplashScreenProvider)

Convenience constructor that extracts the required data from fragmentActivity and the Android application class. The Android application class must implement the IviApplication interface.

constructor(context: Context, lifecycleOwner: LifecycleOwner, iviInstanceId: IviInstanceId, iviServiceProvider: IviInstanceBoundIviServiceProvider, staticConfigurationProvider: StaticConfigurationProvider, fragmentManager: FragmentManager, viewModelStoreOwner: ViewModelStoreOwner, frontendMetadata: Collection<FrontendMetadata>, splashScreenProvider: SplashScreenProvider)