Alexa Auto SDK  4.3
Public Types | Public Member Functions | List of all members
aace::alexa::TemplateRuntime Class Referenceabstract

Public Types

using FocusState = aace::alexa::FocusState
 

Public Member Functions

virtual void renderTemplate (const std::string &payload, FocusState focusState)=0
 
virtual void clearTemplate ()=0
 
virtual void renderPlayerInfo (const std::string &payload, PlayerActivity audioPlayerState, std::chrono::milliseconds offset, FocusState focusState)=0
 
virtual void clearPlayerInfo ()=0
 
void displayCardCleared ()
 

Detailed Description

TemplateRuntime should be extended to handle directives from the Engine for rendering visual metadata with display cards.

Metadata is provided as structured JSON and should be parsed by the platform implementation for rendering cards that adhere to design guidelines for the platform device type. For screen-specific design guidance, see the AVS UX Design Overview: https://developer.amazon.com/docs/alexa-voice-service/ux-design-overview.html#displaycards

Deprecated:
This platform interface is deprecated. Use the Alexa Auto Services Bridge (AASB) message broker to publish and subscribe to AASB messages instead.
See also
aace::core::MessageBroker

Member Typedef Documentation

◆ FocusState

Alias the common FocusState and PlayerActivity namespaces.

Member Function Documentation

◆ renderTemplate()

virtual void aace::alexa::TemplateRuntime::renderTemplate ( const std::string &  payload,
FocusState  focusState 
)
pure virtual

Provides visual metadata associated with a user request to Alexa. The platform implementation should parse the template metadata and render a display card for the user.

For supported templates and rendering guidelines, see https://alexa.design/DevDocRenderTemplate

Parameters
[in]payloadRenderable template metadata in structured JSON format
[in]focusStateThe FocusState of the channel used by TemplateRuntime interface

◆ clearTemplate()

virtual void aace::alexa::TemplateRuntime::clearTemplate ( )
pure virtual

Notifies the platform implementation to dismiss the template display card

◆ renderPlayerInfo()

virtual void aace::alexa::TemplateRuntime::renderPlayerInfo ( const std::string &  payload,
PlayerActivity  audioPlayerState,
std::chrono::milliseconds  offset,
FocusState  focusState 
)
pure virtual

Provides visual metadata associated with a user request to Alexa for audio playback. The platform implementation should parse the player info metadata and render a display card for the user. The audioPlayerState and offset are useful for implementing the progress bar in the display card. It is assumed that the client is responsible for progressing the progress bar when the AudioPlayer is in PLAYING state.

For rendering guidelines, see https://amzn.to/DevDocTemplatePlayerInfo

Parameters
[in]payloadRenderable player info metadata in structured JSON format
[in]audioPlayerStateThe state of the AudioPlayer
[in]offsetThe offset in millisecond of the media that AudioPlayer is handling
[in]focusStateThe FocusState of the channel used by TemplateRuntime interface
See also
PlaybackController
AudioPlayer

◆ clearPlayerInfo()

virtual void aace::alexa::TemplateRuntime::clearPlayerInfo ( )
pure virtual

Notifies the platform implementation to dismiss the player info display card

◆ displayCardCleared()

void aace::alexa::TemplateRuntime::displayCardCleared ( )

Notifies the Engine that a display card has been cleared from the screen. Upon getting this notification, the TemplateRuntime will release the visual channel.


Alexa Auto SDK 4.3 - Copyright 2017-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0