IviServiceBase

abstract class IviServiceBase<P : Any, PO : IviServicePropertiesObserver> constructor(iviServiceHostContext: IviServiceHostContext) : LifecycleOwner

Base for the generated base classes of IVI Services.

This class is parameterized by the properties class P and the properties observer interface PO of an IVI service.

Parameters

iviServiceHostContext

The IVI service host context.

Constructors

Link copied to clipboard
fun IviServiceBase(iviServiceHostContext: IviServiceHostContext)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val context: Context

The Android context of the service.

Link copied to clipboard

Allows retrieving the values of dynamic configurations using a configuration key.

Link copied to clipboard
open val isLogStatusWhenNotReadyEnabled: LiveData<Boolean>

Can be overridden to disable logging status information when serviceReady is false. The status will be logged every logStatusWhenNotReadyInterval milliseconds.

Link copied to clipboard
val iviInstanceId: IviInstanceId?

The IVI instance ID of the service host. null if the IVI service is a global IVI service.

Link copied to clipboard
val iviServiceProvider: IviServiceProvider

IVI service provider instance.

Link copied to clipboard
open val logStatusWhenNotReadyInterval: Duration

Interval in milliseconds in between logging the service status info when serviceReady is false and when isLogStatusWhenNotReadyEnabled is true.

Link copied to clipboard
abstract val propertiesObservers: LifecycleAwareListeners<PO>

Allows the registration of properties observer.

Link copied to clipboard
abstract val serviceId: IviServiceId

IviServiceId of the IVI Service. Implemented by the generated <Interface>Base class.

Link copied to clipboard
val serviceLifecycleState: LiveData<Lifecycle.State>

The service lifecycle state.

Link copied to clipboard

Allows retrieving the values of static configurations using a configuration key.

Functions

Link copied to clipboard
abstract fun appendStatusInfo(stringBuilder: StringBuilder)

Called to log the status of the service.

Link copied to clipboard
abstract fun createConnectionFactory(ipcMessageDispatchFailureListener: IpcMessageDispatchFailureListener): IviServiceConnectionFactory

Creates a connection factory for this IVI service interface.

Link copied to clipboard
override fun getLifecycle(): Lifecycle
Link copied to clipboard
abstract fun initializePropertyObserver(propertiesObserver: PO)

Initializes the given propertiesObserver with all properties values.

Link copied to clipboard
@CallSuper
open fun onCreate()

Called by the system when the service is created.

Link copied to clipboard
@CallSuper
open fun onDestroy()

Called when the service is being destroyed.