Every New APL Feature Announced at Alexa Live

Austin Vach Jul 21, 2021
Share:
Multimodal
Blog_Header_Post_Img

Today at Alexa Live we announced several new features in the Alexa Presentation Language (APL) that enable you to create great new experiences for your customers. APL includes both audio and visual features that are supported on an ever-expanding list of devices including Echos, FireTVs, select TVs from LG, Samsung, and Panasonic, Facebook Portal, and more. On average, APL-based multimodal skills see more than 3x the amount of monthly active users compared to voice-only skills on the same devices.

New Audio Features

APL for Audio (APLA) is Now Generally Available

Launched as a Public Beta at last year’s Alexa Live, APLA is now generally available (GA)! We want to thank everyone who participated in the beta and for the feedback you provided to make the service better. GA is an important milestone but, as Amazonians like to say, it’s still day one. We’re still working on a lot of new features and even have a couple to announce today!

Beginning today, APLA can be used in a reprompt (a second prompt given when a user doesn’t respond to your first prompt). APLA reprompts enables rich, layered audio using a wide range of file types and sample rates. To use the new feature, configure your reprompt object as follows:

Copied to clipboard
"reprompt": {
    "directives": [
        {
            "type": "Alexa.Presentation.APLA.RenderDocument",
            "document": <APLA Document>
        }
    ]
}

Since our Public Beta launch, APLA has accepted high quality audio (up to 44.1kHz sample rate) as INPUT to an audio response. That audio was then down-sampled to 24kHz for playback on device. As part of our GA launch, we no longer down-sample the audio when responding on devices that can support it which means your customers can listen to your audio as it was meant to be heard.

To take advantage of this feature, send us audio with sample rates up to 48kHz (new upper limit) and we’ll intelligently adapt it to the devices your customers are using. The best part is that it’s “set and forget”, meaning that as more devices start supporting high quality audio you won’t have to make any additional changes to begin using the new capabilities. 

Learn more.

APLA Partner Experiences

To hear how other skill builders are taking advantage of these new capabilities, please check out the following skills by a few of our partners: Red Bull, wanderlust, Big Sky, and Art Museum.

New Visual Features

APL’s position property now accepts a “sticky” value which enables you to keep an item on screen until it’s pushed off by another “sticky” object. Sticky headers help when scrolling through large lists like calendar events, contacts, and more.

Sticky Header Demo

Sample Code:

Copied to clipboard
{
    "type": "APL",
    "version": "1.7",
    "theme": "dark",
    "mainTemplate": {
        "parameters": [
            "payload"
        ],
        "item": {
            "type": "Sequence",
            "height": "100%",
            "width": "100%",
            "data": [
                {
                    "backgroundColor": "red",
                    "itemText": "Sticky Header 1"
                },
                {
                    "backgroundColor": "orange",
                    "itemText": "Sticky Header 2"
                },
                {
                    "backgroundColor": "green",
                    "itemText": "Sticky Header 3",
                    "position": "relative"
                },
                {
                    "backgroundColor": "blue",
                    "itemText": "Sticky Header 4"
                },
                {
                    "backgroundColor": "purple",
                    "itemText": "Sticky Header 5"
                },
                {
                    "backgroundColor": "violet",
                    "itemText": "Sticky Header 6"
                }
            ],
            "items": [
                {
                    "type": "Container",
                    "height": "300dp",
                    "width": "100%",
                    "items": [
                        {
                            "type": "Frame",
                            "backgroundColor": "${data.backgroundColor}",
                            "position": "sticky",
                            "top": 0,
                            "width": "100%",
                            "item": {
                                "type": "Text",
                                "text": "${data.itemText}",
                                "fontSize": 120,
                                "height": 160,
                                "width": "100%",
                                "paddingLeft": 10
                            }
                        }
                    ]
                }
            ]
        }
    }
}

APL now supports inline text styling which enables you to change text size and color using a <span> markup tag in the Text Component. In particular, <span> will enable you to change inline text sizes through setting density-independent pixels (dp) for a desired piece of text, and setting customizable colors for spans of text. Inline styles are helpful when trying to draw attention.

Headline ARL in English

Sample Code:

Copied to clipboard
{
    "type": "APL",
    "version": "1.7",
    "theme": "light",
    "mainTemplate": {
        "item": {
            "type": "Text",
            "fontSize": "48dp",
            "text": "Customizable <span color='orange' fontSize='32dp'><i>text styling</i></span> <span color='purple'>in</span> <span color='royalblue' fontSize='72dp'><b>APL</b></span> has <span color='brown'>arrived</span>"
        }
    }
}

As announced back in June, Alexa now supports the Arabic language. To enable skill builders to create rich and engaging Arabic multimodal experiences, APL now supports right-to-left (RTL) layouts.
Skill builders wanting to build RTL multimodal experiences will need to:

  1. Set the lang property to “ar-SA”
  2. Set the layoutDirection property to “RTL”

APL will mirror components based on language and layout direction. Below is an example of the AlexaHeadline template with lang and layoutDirection properties bound to the data source.

Left-to-Right (LTR) Layout

Headline ARL in English

Right-to-Left (RTL) Layout

Headline ARL in Arabic

Sample Code:

Copied to clipboard
{
    "type": "AlexaHeadline",
    "layoutDirection": "${payload.headlineData.responseLanguage.layoutDirection}",
    "lang": "${payload.headlineData.responseLanguage.language}",
    "primaryText": "${payload.headlineData.textContent.primaryText}",
    ...
}

Data Source:

Copied to clipboard
{
    "headlineData": {
        "responseLanguage": {
            "layoutDirection": "RTL",
            "language": "ar-SA"
        },
        "textContent": {}
    }
 }
APL Widgets

APL Widgets are glanceable, self-updating, and interactive APL documents displayed on the home screen of multimodal devices. Widgets offer truly ambient experiences, enable better multitasking on Alexa, and increase the discoverability of skills. As a skill builder, widgets offer you the opportunity to surface your latest content or upcoming events, interact with customers without starting the full skill experience, and give customers a quick way to go directly to the most interesting part of your skills. To sign-up for preview access, please fill out our survey.

Sample Widget using a LTR Layout

Headline ARL in English

Sample Widget using a RTL Layout

Headline ARL in Arabic

Sample Code:

Copied to clipboard
{
    "type": "APL",
    "version": "1.7",
    "theme": "dark",
    "import": [
        {
            "name": "alexa-layouts",
            "version": "1.4.0"
        }
    ],
    "mainTemplate": {
        "parameters": [
            "payload"
        ],
        "bind": [
            {
                "name": "layoutDirection",
                "value": "${payload.metadata.layoutDirection}"
            },
            {
                "name": "lang",
                "value": "${payload.metadata.lang}"
            }
        ],
        "items": [
            {
                "type": "AlexaTextWrapping",
                "layoutDirection": "${layoutDirection}",
                "lang": "${lang}",
                "primaryText": "الحلقة الثانية من Jack Ryan جاهزة الآن للعرض",
                "backgroundColor": "turquoise",
                "headerTitle": "PrimeTV",
                "headerAttributionPrimacy": false
            }
        ]
    }
}

Data Source:

Copied to clipboard
{
    "metadata": {
        "layoutDirection": "RTL",
        "lang": "ar-SA"
    }
} 

Help Shape the Future of APL Tooling!

Have you used the APL authoring tools to build multimodal experiences? Are you interested in sharing your feedback? If you answered yes to both questions, we’d love to speak with you. Please email us at ask-multimodal-research-interest@amazon.com. We'll ask you to complete a survey, complete a few usability exercises, and then participate in a short interview. Your feedback will help us shape the future of APL tooling!

Display Template Retirement

As announced in a previous blog post, Display Templates are going away on August 31 2021 to make way for APL templates that work on more 3P devices, are customizable, and have more functionality, such as support for Widgets, APLA, and Arabic . To assist you in migrating your Display Template experiences to APL, we have compiled an extensive migration guide that maps Display Templates to Alexa Responsive Templates. You are not alone in this journey, all Amazon experiences are migrating to APL, and some of the most popular 3P skills like Akinator are already using it.

We look forward to seeing the great things you build!

Subscribe