VpaAdaptationService

interface VpaAdaptationService

Service responsible to interface directly with a specific VPA engine. This service API should be implemented by a VPA provider.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val activeTemplate: Template?

The active Template to render or null if there is no Template to render.

Link copied to clipboard
abstract val alerts: List<VpaAlert>

The state of the VPA's alerts.

Link copied to clipboard
abstract val dialogueState: DialogueState

The state of the conversation with the VPA. This helps a UI indicate whether, for example, the VPA is waiting for the user to reply to a question.

Link copied to clipboard
abstract val hasPendingNotifications: Boolean

True if the VPA has notifications which are available to be retrieved, false otherwise.

Link copied to clipboard
abstract val vpaAuthenticationStatus: VpaAuthenticationStatus

The status of the authentication process for this VPA.

Link copied to clipboard
abstract val vpaAvailabilityState: VpaAvailabilityState

Indicates whether this VPA is ready for use by clients. An VpaAvailabilityState.AVAILABLE VPA should provide valid data as results when its other properties such as vpaAuthenticationStatus, vpaSettings, dialogueState are accessed. This VPA should not be in the VpaAvailabilityState.AVAILABLE state if it cannot provide valid results when these properties are queried. It should also not set itself to this state if it is, for example, busy initializing itself or in an erroneous state which prevents it from being used for any API call.

Link copied to clipboard
abstract val vpaProperties: VpaProperties

Information relating to this VPA.

Link copied to clipboard
abstract val vpaSettings: VpaSettings

The current settings for this VPA.

Functions

Link copied to clipboard
open suspend fun enableDoNotDisturbMode(enable: Boolean)

Enables or disables "Do Not Disturb" mode with this VPA. When enabled, all incoming notifications, announcements etc. are blocked, except for high priority ones such as alarms and timers.

Link copied to clipboard
open suspend fun enableEarcon(earconType: VpaEarconType, enable: Boolean)

Enables or disables the earcon of type earconType. An earcon sound will be played only if its corresponding VpaEarconType is enabled.

Link copied to clipboard
open suspend fun enableLocationSharing(enable: Boolean)

Enables or disable location sharing with this VPA. If location sharing is enabled, the vehicle's current location is shared with this VPA to, for example, get smarter responses for nearby restaurants, local weather, navigation requests and more.

Link copied to clipboard
open suspend fun enablePrivacyMode(enable: Boolean)

Enable Privacy mode for this VPA.

Link copied to clipboard
open suspend fun enableSyncVehicleNavigationFavorites(enable: Boolean)

Enables or disables synchronization of the vehicle navigation favorites with this VPA. When enabled, the VPA will be informed of the user's favorite addresses (for example, Home or Work).

Link copied to clipboard
open suspend fun enableWakeUpWord(enable: Boolean)

Asks the VPA to enable or disable Wake Up Word detection.

Link copied to clipboard
open suspend fun logIn()

Request to authenticate with this VPA service, if it is necessary to access this VPAs functionality. The result of the authentication request can be monitored by observing the vpaAuthenticationStatus.

Link copied to clipboard
open suspend fun logOut()

Logs the end-user out of the VPA service, if they were previously logged in. The result of this process can be monitored by observing the vpaAuthenticationStatus.

Link copied to clipboard
open suspend fun onActiveTemplateCleared()

Notifies the VPA that the UI component visualizing the active template has been removed.

Link copied to clipboard
open suspend fun onCustomUiEvent(event: VpaMessage)

Notifies the VPA that a custom UI event occurred.

Link copied to clipboard
open suspend fun removeAllAlerts()

Asks the VPA to clear all active and pending alerts.

Link copied to clipboard
open suspend fun startListening()

Asks the VPA to start listening for audio. This should be called, for example, when the user wants to speak to the VPA and has indicated this by pressing a push-to-talk button.

Link copied to clipboard
open suspend fun stopActiveAlerts()

Asks the VPA to stop all the active alerts.

Link copied to clipboard
open suspend fun stopCurrentInteraction()

Asks the VPA to stop the current interaction (if any) and go back to its idle state.

Link copied to clipboard
open suspend fun updateActiveLocales(locales: List<Locale>)

Asks the VPA to update the active locales. These are the languages that will be spoken and recognized by the VPA.

Link copied to clipboard
open suspend fun updateAllowedPersonalData(bluetoothDeviceAddress: BluetoothDeviceAddress, allowedPersonalData: EnumSet<PersonalDataType>)

Updates the set of personal data types that the user has allowed to be sent to this VPA service. The VPA could typically use this information to, for example, recognise contact names for hands free calling and to read messages aloud.