Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get started
Connect with Matter
Alexa Connect Kit
Add-ons
Certify
Resources
Skip to main content
Implement the Alexa.UIController interface in your Alexa skill so that users can voice-control onscreen navigation. You can voice-enable the user interface of entertainment devices, such as televisions and game consoles. For details about video skills, see Understand the Video Skill API. When you implement the Alexa.UIController interface, you can send Alexa the full details of all user interface elements that appear on the screen, such as buttons, dialogues with options, menu items, and search results. For example, you can send a ChangeReport when a dialog appears on the screen with the options continue watching and exit. After that, the user can say For more scenarios, see the Alexa.UIController Interface for Fire TV. If you want to voice-enable onscreen navigation without sending the full user interface details, implement the Alexa.KeypadController interface instead. For the list of languages that the UIController interface supports, see List of Alexa Interfaces and Supported Languages. For the definitions of the message properties, see Alexa Interface Message and Property Reference.

Utterances

The Alexa.UIController interface uses the pre-built voice interaction model. After the user says one of the following utterances, Alexa sends a corresponding directive to your skill. The following examples show some user utterances:

If you want users to be able to say or , also implement the Alexa.KeypadController interface.

Properties and objects

Reportable properties

The Alexa.UIController interface supports the focusedUIElement and uiElements properties. You identify that you support the properties in your discovery response.

FocusedUIElement property

The Alexa.UIController interface uses the focusedUIElement property to represent the element on the user interface that has the focus. The focusedUIElement property value is an object. The following table shows the definition of the FocusedUIElement object.
PropertyDescriptionTypeRequired
sceneIdentifying information about the user interface that currently appears on the user’s screen.Scene objectYes
elementIdentifies the element in the user interface that has the focus.Element objectYes

UiElements property

The Alexa.UIController interface uses the uiElements property to represent all the elements in the current user interface. The uiElements property value is an object. The following table shows the definition of the UiElements object.
PropertyDescriptionTypeRequired
sceneIdentifying information about the user interface that currently appears on the user’s screen.Scene objectYes
elementsIdentifies the element in the user interface that has the focus.Array of Element objectsYes

Element object

The Alexa.UIController interface uses the Element object to represent an individual item that appears on the user’s screen. The following example shows a video element.
The following table shows the definition of the Element object.
PropertyDescriptionTypeRequired
elementIdUnique identifier for the user interface element in this scene.StringYes
ordinalNumber of the element when the user can refer to the element by number, such as IntegerNo
uiSupportedActionsList of actions that a user can perform on the element.
Valid values: SELECT, EXPAND, SCROLL_RIGHT, SCROLL_LEFT, SCROLL_UP, SCROLL_DOWN, SCROLL_FORWARD, SCROLL_BACKWARD.
Array of stringsYes
entityInformation about the element.Entity objectYes
elementsChild elements of the element. Include the element.elements field for element objects in the uiElements property only.Array of Element objectsNo

Entity object

The Alexa.UIController interface uses the Entity object to represent the content of a UI element. The following example shows a video entity.
The following table shows the definition of the Entity object.
PropertyDescriptionTypeRequired
typeDescribes the UI element. For more details, see Entity type values.
Valid values: AMAZON.ImageObject, AMAZON.ItemList, AMAZON.SoftwareApplication, AMAZON.Thing, AMAZON.VideoObject.
StringYes
nameName of the entityObjectNo
name.valuePreferred name of the entity, such as “The Marvelous Mrs. Maisel.”StringYes
name.variantsList of alternate names for the entity, such as “Mrs. Maisel.”Array of stringsNo
externalIdsExternal identifiers for the entity.Map<String, String>No

Entity type values

The following table shows the string values for the type property.
ValueDescription
AMAZON.ImageObjectAn image or photo.
AMAZON.ItemListA collection of entities of the same or different types, such as a collection of photos.
AMAZON.SoftwareApplicationAn app, such as Netflix.
AMAZON.ThingA type that you can use when the entity doesn’t fit the other type categories.
AMAZON.VideoObjectA video item rendered on a UI. This entity is an abstraction for various types of videos, such as movies, trailers, TV shows.

Scene object

The Alexa.UIController interface uses the Scene object to identify the user interface that currently appears on the user’s screen. The following example shows the home screen.
The following table shows the definition of the Scene object.
PropertyDescriptionTypeRequired
sceneIdUnique identifier for a set of UI elements that appear on the user’s screen.StringYes

Discovery

You describe endpoints that support Alexa.UIController by using the standard discovery mechanism described in Alexa.Discovery. Set retrievable to true for the properties that you report when Alexa sends your skill a state report request. Set proactivelyReported to true for the properties that you proactively report to Alexa in a change report. For the full list of display categories, see display categories.

Discover response example

The following example shows a Discover.Response message for a device that supports the Alexa.UIController and Alexa.PowerController interfaces.

Directives

Alexa sends the following Alexa.UIController interface directives to your skill.

ActionOnUIElement directive

Support the ActionOnUIElement directive so that users can voice-control your user interface.

ActionOnUIElement directive example

The following example shows a ActionOnUIElement directive that Alexa sends to your skill.

ActionOnUIElement directive payload

The following table shows the payload details for the ActionOnUIElement directive.
PropertyDescriptionTypeRequired
sceneIdentifies the user interface scene that the user is trying to act on.Scene objectYes
actionIdentifies the action that the user wants to perform.
Valid values: SELECT, EXPAND, SCROLL_RIGHT, SCROLL_LEFT, SCROLL_UP, SCROLL_DOWN, SCROLL_FORWARD,SCROLL_BACKWARD.
StringYes
elementIdentifies the element that the user wants to perform the action on.Element objectYes

ActionOnUIElement response

If you handle a ActionOnUIElement directive successfully, respond with an Alexa.Response event. In the context object, include the values of all relevant properties. The following example shows a ActionOnUIElement response.

ActionOnUIElement directive error handling

If you can’t handle a ActionOnUIElement directive successfully and the error is specific to video, respond with an Alexa.Video.ErrorResponse event. For general errors, respond with a generic Alexa.ErrorResponse event.

State reporting

Alexa sends a ReportState directive to request information about the state of an endpoint. When Alexa sends a ReportState directive, you send a StateReport event in response. The response contains the current state of all the retrievable properties in the context object. You identify your retrievable properties in your discovery response. For details about state reports, see Understand State and Change Reporting.

StateReport response example

Change reporting

You send a ChangeReport event to report changes proactively in the state of an endpoint. You identify the properties that you proactively report in your discovery response. For details about change reports, see Understand State and Change Reporting.

ChangeReport event example

ChangeReport event example to reset UI

To reset the UIController state, for example, when the user opens an app on the device that you don’t control, send a change report with an empty uiElements property.
Last modified on August 23, 2024