FrontendConfig

data class FrontendConfig(val frontendBuilderName: String, val implementationModule: ModuleReference, val subPackageName: String? = null, val creationPolicy: FrontendCreationPolicy = FrontendCreationPolicy.CREATE_AFTER_STARTUP, val extensions: List<FrontendExtensionConfig> = emptyList(), val intentFilters: List<IntentFilterConfig> = emptyList(), val availablePanelTypes: PanelTypesConfig? = null, val dependencies: IviServiceDependencies = IviServiceDependencies())

Defines the reference to a frontend implementation and how to configure it.

Parameters

frontendBuilderName

The name of the frontend builder class.

The frontend builder name must be formatted in PascalCase and must end with the FrontendBuilder suffix. The FrontendBuilder suffix is mandatory to make it easier for developers to find where the class is used in the code base.

The frontend builder name needs to match a class with the same name that implements the com.tomtom.ivi.platform.frontend.api.common.frontend.FrontendBuilder class.

implementationModule

The module that contains the class that implements the com.tomtom.ivi.platform.frontend.api.common.frontend.FrontendBuilder class.

The package name of the class is obtained from this ModuleReference. If the class resides in a sub package within this module, the sub package can be provided through subPackageName. This subPackageName is appended to the package name of the module, with a period in between.

subPackageName

Optional sub package. If not null, this value is appended to the ModuleReference.packageName of the implementationModule property with a period in between.

creationPolicy

The creation policy of the frontend. Determines when the frontend should be created relative to the lifecycle of the IVI system.

extensions

The frontend extensions configuration. The configured frontend extensions will be set to the frontendBuilderName class instance.

intentFilters

Intent filters associated with this frontend.

The intent filters also need to be added separately to the Android manifest.

availablePanelTypes

A reference to a runtime set of panels that are available to the frontend. By default, all of the panel types offered by the TomTom Digital Cockpit platform are included.

When introducing a new panel type, frontends using it must have the type specified here for the frontend to be able to use it, e.g., by passing a reference to val EXPANDED_PANEL_TYPES = PLATFORM_PANEL_TYPES + CustomPanel::class. This information is also used by the system UI to determine whether or not it can support the frontends it's asked to present panels for.

dependencies

IVI service dependencies of the frontend implementation.

A frontend implementation can require other IVI service interfaces to be registered. This allows misconfiguration to be detected at build time.

Constructors

Link copied to clipboard
constructor(frontendBuilderName: String, implementationModule: ModuleReference, subPackageName: String? = null, creationPolicy: FrontendCreationPolicy = FrontendCreationPolicy.CREATE_AFTER_STARTUP, extensions: List<FrontendExtensionConfig> = emptyList(), intentFilters: List<IntentFilterConfig> = emptyList(), availablePanelTypes: PanelTypesConfig? = null, dependencies: IviServiceDependencies = IviServiceDependencies())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val subPackageName: String? = null

Functions

Link copied to clipboard
fun copyAndAdd(extensions: List<FrontendExtensionConfig> = emptyList(), intentFilters: List<IntentFilterConfig> = emptyList(), dependencies: IviServiceDependencies = IviServiceDependencies()): FrontendConfig

Copies this FrontendConfig, adds the given extensions, intentFilters and dependencies to the copied instance, and returns it.

Link copied to clipboard
fun toMenuItem(menuItemName: String): MenuItemConfig

Creates a MenuItemConfig for a menu item defined in the same module and package as this frontend.