Skip to content

Instantly share code, notes, and snippets.

View arunjeetsingh's full-sized avatar

Arunjeet Singh arunjeetsingh

View GitHub Profile
Use this template to report Alexa Presentation Language (APL) issues to the product team
Description: <High level description>
1- Do you think the problem is a regression? Did this work in an earlier version of APL?
2- Device Details 
Fill these out if this issue is reproducible on a device.
@arunjeetsingh
arunjeetsingh / APLOpenSource.md
Last active August 11, 2021 01:42
APL Framework Open Source Repositories

APL Open Source Repositories

This gist is a list of respositories that make up the Alexa Presentation Language (APL) open source framework. If you simply interested in building Alexa multimodal skills that use visuals, touch, remote, motion, and layered audio on Alexa devices go to https://alexa.design/apl-cake-walk and https://alexa.design/apl to get started. If you want to build a device with a multimodal Alexa check out the Smart Screen SDK here https://github.com/alexa/alexa-smart-screen-sdk. If, on the other hand, you're interested in learning how APL works or build tools to help developers and designers of Alexa multimodal experiences then these repositories are where it's at!

  1. APL Core Library (https://github.com/alexa/apl-core-library) - The rendering of screen layouts at runtime for the Alexa Presentation Language is controlled by the APL Core Library, which is an abstract engine that manages APL document parsing, layout inflation, event handling, commands, and the rendering workflow. The APL
{
"directives": [
{
"type": "Alexa.Presentation.APL.RenderDocument",
"document": {
"type": "APL",
"version": "1.5",
"import": [
{
"name": "AnimationPackage",
{
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>Watch as I move this plane based on your position!</speak>"
},
"directives": [
{
"type": "Alexa.Presentation.APL.RenderDocument",
"document": {
"type": "APL",
{
"outputSpeech": {
"type": "SSML",
"ssml": "<speak>Watch as I move this plane using the device position!</speak>"
},
"directives": [
{
"type": "Alexa.Presentation.APL.RenderDocument",
"document": {
"type": "APL",
@arunjeetsingh
arunjeetsingh / GoBack.json
Last active September 2, 2020 02:47
This gist consists of 3 skill responses that together show how to use the new APL back stack extension with a voice command. Page1.json shows a response that renders the first page of the interaction. Note that we load the back extension and set a backstackId on Page1 so it is added to the back stack. When a customer speaks an utterance (say "go…
//When a customer says "go back" or something similar next a skill
//can respond with GoBack.json to navigate back on the back stack.
//Note that the "token" value for the GoBack response's ExecuteCommands
//directive and the token value for the APL document currently
//rendered (Page2.json) must be the same. This is how Alexa knows where
//to direct the commands.
{
"outputSpeech": {
"type": "SSML",
@arunjeetsingh
arunjeetsingh / PagingAndTalking.json
Last active November 25, 2020 16:08
An example of a skill response that plays some preamble speech and then pages through slides in a pager one at a time while synchronizing speech to the content of each slide. Could be used to tell a story with voice/sound effects, describe a set of pictures, or even a weather forecast accompanied by multiple visuals.
{
"directives": [{
"type": "Alexa.Presentation.APL.RenderDocument",
"document": {
"type": "APL",
"version": "1.5",
"onMount": [
{
"type": "Sequential",
"commands": [
{
"document": {
"type": "APL",
"version": "1.4",
"import": [
{
"name": "alexa-layouts",
"version": "1.2.0"
}
],
{
"document": {
"type": "APL",
"version": "1.4",
"import": [
{
"name": "alexa-layouts",
"version": "1.2.0"
}
],
@arunjeetsingh
arunjeetsingh / GradientBackgroundNoPicture.json
Last active July 27, 2020 23:13
An APL document with a gradient background and optional picture. More about APL here https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/understand-apl.html.
{
"document": {
"type": "APL",
"version": "1.4",
"import": [
{
"name": "alexa-layouts",
"version": "1.2.0"
}
],