Back to all updates

almost 5 years ago

Designing your Alexa Skill using APL

You can design with APL (Alexa Presentation Language) - When you design with APL, you create APL documents, which are JSON files sent from your skill to a device. The device evaluates the APL document, imports images and other data as needed, and renders the experience. In your APL documents, you can use:

  • Images, Text, and ScrollViews:  You can deliver images and text on-screen, and specify text color, size, and weight for available fonts. You can use ScrollViews to display text that is outside the bounds of the container. And, you can make both text and images responsive to touch using TouchWrappers.
  • Pagers and Sequences: You can use Pagers to show a time-ordered sequence of items that typically advance automatically, such as slideshows. Or you can use Sequences to show a continuous list of choices, such as local restaurants, and allow customers to navigate the list via voice or by touch / remote control.
  • Layouts and Conditional Expressions: You can use Layouts to group components such as images, text, ScrollViews, pagers, and sequences, as well as describe their placement on screen. You can nest layouts, and take advantage of header, footer, and hint layouts provided by Amazon. You can customize by device type using the when property in your layouts; for example, you might conditionally select one nested layout when the device shape is round, and another when the shape is rectangular.
  • Speech Synchronization and Other Commands: You can send commands that change the audio or visual presentation of the content of the screen or generate them automatically within your APL documents. For example, you can highlight the line or block of text currently being read using the SpeakItem command and highlightMode. You can use SetPage and AutoPage commands to control the pages displayed in a Pager component, and the Idle command to insert pauses.
  • Video, Audio, and HTML5 (Coming Soon): In the coming months, you'll be able to include video and audio content within your APL layouts and continue your skill experience when media playback is done. You’ll also be able to use HTML5 in your skills. We’ll share more about these capabilities in the coming months.

You can use the new APL authoring tool and test simulator in the Alexa Developer Console to iterate on your designs, visualize how they’ll render, and test interactions.

Read the full article about APL here

Questions?

If you have any questions about the hackathon, please post on the discussion forum.