Build Skills on Echo Dot with Clock with Alexa Presentation Language (APL)
Arunjeet Singh Oct 21, 2019
Share:
Build Multimodal Developer Console News
Blog_Header_Post_Img

Today, we are excited to announce that you can start building skills using Alexa Presentation Language (APL) on the Echo Dot with clock, one of Amazon’s newest Echo devices. With this new capability, APL can be used to build visual experiences on a new class of devices with character-based displays. APL is already supported on multiple devices such as the Echo Show, Echo Spot, Fire TVs, LG TVs, and Lenovo Smart Tab devices. In the future, we will continue to invest in APL and bring it to even more devices and modalities.

Echo Dot with Clock

Echo Dot with clock has a seven-segment alphanumeric display and will show a clock face most of the time. The device cannot display images or videos. When a customer interacts with Alexa on Echo Dot with clock, the display will show information specific to the voice experience during the duration of the experience. For example, if a customer asks for the temperature, the device will display the current temperature during the interaction and return to the clock face once the interaction is completed.

APL Support for Character Display Devices

To get started with building a skill on Echo Dot with clock, turn on the ALEXA_PRESENTATION_APL interface in your skill's manifest or use the Interfaces tab in the skill developer console.

To detect when a customer is using a character display device such as an Echo Dot with clock, look for the Alexa.Presentation.APLT supported interface in your skill request. This is different from the Alexa.Presentation.APL interface you see in your skill request if a customer uses a device like an Echo Show, Fire TV, or Fire tablet. The skill request will also contain viewport information about the device's character display including the supported format. This is especially important because formats like SEVEN_SEGMENT don't support certain characters, such as the letters k, m, v, w, x. The full details of the SEVEN_SEGMENT format can be found in the APLT viewports documentation here. Any characters not supported by the format will be treated as a space (' ') character.

Copied to clipboard
{
    "version": "1.0",
    "session": {
        ...
    },
    "context": {
        "system": {
            "device": {
                "deviceId": String,
                "supportedInterfaces": {
                    "Alexa.Presentation.APLT": {
                        "runtime": {
                            "maxVersion": "1.0"
                        }
                    }
                    ...
                }
            }
        },
        ...
        "Viewports": [
            {
                "id": "main",
                "type": "APLT",
                "supportedProfiles": ["FOUR_CHARACTER_CLOCK"],
                "lineLength": 4,
                "lineCount": 1,
                "format": "SEVEN_SEGMENT",
                "interSegments": [
                     {
                         "x": 2,
                         "y": 0,
                         "characters": "':."
                     }
                ]
            }
        ],
        ...
}

To render APL on a device that supports the Alexa.Presentation.APLT interface, use the new Alexa.Presentation.APLT.RenderDocument directive and respond with an APLT document. The code sample below shows a simple APLT document that uses the overflow and msPerCharacter properties of the Text component (only available in APLT documents) that let devices with limited screen real estate scroll text horizontally. Echo Dot with clock also supports a limited number of APL commands that can be sent to devices using the Alexa.Presentation.APLT.ExecuteCommands directive.

Copied to clipboard
{
    "outputSpeech": {
        "type": "SSML",
        "ssml": "This is APL on an Echo Dot with Clock!"
    },
    "directives": [
        {
            "type": "Alexa.Presentation.APLT.RenderDocument",
            "document": {
                "type": "APLT",
                "version": "1.0",
                "mainTemplate": {
                    "items": [
                        {
                            "type": "Text",
                            "text" : "thIS IS yOUr APL ",
                            "overflow": "marquee",
                            "msPerCharacter": 500
                        }
                    ]
                }
            },
            "datasources": {}
        }
    ]
}
echo dot with clock gif

APL Components & Commands You Can Use to Build

The following APL components and commands are supported with APLT documents on Echo Dot with clock:

  • Text: The Text component in APLT documents does not support the ability to set font information. However, it does support the ability to handle text overflow by introducing the new overflow and msPerCharacter properties. These properties are unique to APLT documents.
  • Container: APLT documents support containers just like APL documents do. Containers can be used to layout other APL components.
  • Pager: Pagers in the APLT document work like regular APL pagers. Since Echo Dot with clock does not have a touch screen or remote, the navigation property is not supported.
  • TimeText: The TimeText component is unique to APLT documents and can be used to present timers and countdowns.
  • Idle, Sequential, and Parallel: The IdleSequential, and Parallel commands can be used to insert delays, sequence commands, or run multiple commands in parallel.
  • SetValue: The SetValue command can be used to update values you have already sent in an APLT document.
  • SetPage/AutoPage: The SetPage/AutoPage commands can be used to drive the Pager component.

If your skill already enables the APL interface, you can update your skill's Lambda function or web service code to start sending APLT documents when it detects the Alexa.Presentation.APLT interface for customers using an Echo Dot with clock. If you don’t update your skill’s lambda or web service code, your skill will simply present the voice-only interface it would use on a speaker device such as an Echo Dot.

We look forward to seeing how you use APL to extend your voice experiences to a new class of devices. Please reach out to me @aruntalkstech on Twitter with any questions.

Learn more.