jovotech / jovo-framework

🔈 The React for Voice and Chat: Build Apps for Alexa, Messenger, Instagram, the Web, and more
https://www.jovo.tech
Apache License 2.0
1.67k stars 310 forks source link

Support for APLT #618

Closed NovaGL closed 4 years ago

NovaGL commented 4 years ago

I'm submitting a...

Just wanting to know if support for the Echo Dot Clock will be added. https://developer.amazon.com/blogs/alexa/post/4228a00a-655d-45fe-80aa-f6d4eaf8a441/build-skills-on-echo-dot-with-clock-with-alexa-presentation-language-apl

It would be really cool to see.

aswetlow commented 4 years ago

We had a PR (by @kouz75) about two weeks ago with a few helper methods.

You could try something like this (not tested)


if (this.$alexaSkill.hasAPLTInterface()) {
    this.$alexaSkill.addDirective({
  "type": "Alexa.Presentation.APLT.RenderDocument",
  "token": "developer-provided-string",
  "targetProfile": "FOUR_CHARACTER_CLOCK",
  "document": {
    "version": "1.0",
    "type": "APLT",
    "mainTemplate": {
      "item": {
        "type": "Text",
        "id": "myTextId",
        "textAlign": "right",
        "text": "Hello",
        "overflow": "marquee"
      }
    }
  },
  "datasources": {}
});
}
NovaGL commented 4 years ago

Thanks, I don't have an Echo Dot Clock atm to test this.

Thanks for this great framework though. I have published a skill using JOVO with APL and Video support.

It's upto you if you want to close this issue.