Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
Diane Olsen edited this page Nov 14, 2019 · 58 revisions

Alexa Smart Screen SDK

The Alexa Smart Screen SDK extends the AVS Device SDK to support development for screen-based Alexa Built-in products. This SDK enables device makers to build screen-based products that complement Alexa voice responses with rich visual experiences.

The Alexa Smart Screen SDK package in this GitHub repo includes:

  • The Alexa Smart Screen SDK
  • A sample app that demonstrates end-to-end Alexa Smart Screen SDK functionality
  • A GUI web view host for rendering APL documents

The Alexa Smart Screen SDK depends on the following additional GitHub repos:

Get Started

You can set up the Alexa Smart Screen SDK by using the following Quick Start Guides:

You can also create your device prototype by using an Amazon-qualified development kit that supports the Smart Screen SDK, such as:

SDK Architecture

This diagram illustrates the data flows between components that comprise the Alexa Smart Screen SDK.

AVS Device SDK: The SDK for Alexa Voice Service, which implements Alexa intelligent voice control functionality.

Capability Agents (CAs): Handle Alexa-driven interactions; specifically directives and events. Each capability agent corresponds to a specific interface exposed by the Alexa Smart Screen API. These interfaces include:

  • AlexaPresentation - The interface for rendering Alexa Presentation Language (APL) documents.
  • TemplateRuntime - The interface for PlayerInfo and Template cards (such as music cards and other static cards).
  • VisualCharacteristics - The interface for reporting the physical properties of visual display devices (such as screen resolution, window size, and supported interaction modes).

APL Core Client Reference Implementation: This is the Alexa Smart Screen SDK's sample app. It has two components: a sample app and a Javascript-based GUI client app.

  • GUIManager: Interface between the capability agents and the GUI
  • GUIClient: Manages messages between the GUI and the rest of the sample app
  • APLCoreTextMeasurement: Handles text measurement requests from the APL Core Library
  • APLCoreConnectionManager: Manages the currently rendered APL document
  • APLCoreGUIRenderer: Handles the creation of APL documents
  • WebSocketServer: Reference implementation of a WebSocket-based messaging interface

APL Core Library Engine: An abstract engine for Alexa Presentation Language (APL) that manages not only APL document parsing and layout inflation, but also event handling, commands, and the rendering workflow.

HTML Rendering Engine: A Javascript-based GUI client app and APL view host that render the visual experience on the device.

  • WebSocket: Reference implementation of a WebSocket client
  • APL Web ViewHost: Renders the APL document generated by the APL Core Library
  • Alexa GUI: Reference GUI implementation

Security Best Practices

All Alexa products should adopt the Security Best Practices for Alexa. Security requirements for the Smart Screen SDK can be found in Security Requirements for Smart Screen AVS.

Important Considerations

Optional Configurations

Run the GUI client with predefined device visual characteristics and GUI client configurations

We provide 4 different sample configuration files of predefined device visual characteristics and GUI client configurations. This can be found under modules/GUI/config/guiConfigSamples. To enable a predefined configuration, You can pass any of them as an extra config file argument after the main Smart Screen SDK config file argument when running the Sample App.

Remote control support

Exit and back remote control functionality is minimally supported by the Smart Screen SDK. The following behaviors are expected to occur:

  • Clear the rendering screen - Exit fully out of the Alexa-presented display so that no static image or layout is left.
  • Release the focus management - Release any focus management that might be held.

Using the predefined device visual characteristics, Esc and B are mapped to Exit and Back respectively.