Package-level declarations

This package contains classes and functions which are intended for use by services or frontends that interact with the Alexa Voice Personal Assistant (VPA).

More specifically, the AacsSenderWrapper class and the utility functions in AlexaMessageData, such as parseAasbMessage or createAasbReplyHeader, should be used when implementing a com.tomtom.ivi.platform.alexa.api.service.alexahandler.AlexaHandlerService.

Types

Link copied to clipboard

An interface representing an AACS message.

Link copied to clipboard
data class AacsReplyMessage(val replyToId: String, val id: String, val topic: String, val action: String, val payload: String) : AacsMessage

Class representing an AACS reply message. A reply is the response to a previously received message.

Link copied to clipboard
data class AacsRequestMessage(val id: String, val topic: String, val action: String, val payload: String) : AacsMessage

Class representing an AACS request message. A request is a message which is not a reply to a previously received message. A request may or may not have a reply.

Link copied to clipboard

A class that is used to send Alexa Auto Services Bridge (AASB) messages to the Alexa Auto Client Service (AACS). A service implementing the AlexaHandlerService should use this class to send requests/replies to the AACS.

Link copied to clipboard
@Serializable
data class ImageSource(val url: String? = null, val darkBackgroundUrl: String? = null, val size: String? = null, val widthPixels: Long? = null, val heightPixels: Long? = null)
Link copied to clipboard
typealias ImageSources = @Serializable List<ImageSource>
Link copied to clipboard
@Serializable
data class ImageStructure(val contentDescription: String? = null, val sources: ImageSources)
Link copied to clipboard
annotation class WarnIfMissingOrNull

Annotation used to mark JSON fields that we allow to be null or missing, but for which we want to print a warning when that's the case.

Properties

Link copied to clipboard

This ID is used to select the AlexaComms self-managed phone account when registered.

Functions

Link copied to clipboard
@IviExperimental(reasons = [])
inline fun <T> buildJsonMessage(message: T): String

Constructs a JSON string from the message of type T.

Link copied to clipboard

Parses the intent to construct an AacsMessage object from it. Only embedded intents are parsable using this method.

Link copied to clipboard
@IviExperimental(reasons = [])
inline fun <T : Any> parseJsonMessage(message: String): T?

Decodes the message in JSON format into an object of type T.

Link copied to clipboard

Returns this string with the Alexa Auto Service Broker (AASB) prefix, resulting in the fully-qualified name of the android.content.Intent action or category.

Link copied to clipboard

Returns this string without the Alexa Auto Service Broker (AASB) prefix.