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 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.
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.
{
"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.
{
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>This is APL on an Echo Dot with Clock!</speak>"
},
"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": {}
}
]
}
The following APL components and commands are supported with APLT documents on Echo Dot with clock:
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.