question

ilker Aktuna avatar image
ilker Aktuna asked

Alexa Skill with APL - OpenURL shows blank

I am trying to create a skill which will display web pages from a local web server.

I added APL support to my skill.

I can display simple APL items like text.

However when I try to use the OpenURL command, all I get is a black screen on my Echo Show devices.


my example json document for APL is here:


{
  "type": "APL",
  "version": "1.9",
  "description": "A hello world APL document.",
  "theme": "dark",
  "mainTemplate": {
    "parameters": [
      "payload"
    ],
    "items": [
      {
          "type": "OpenURL",
          "source": "http://192.168.254.240/",
          "onFail": {
            "type": "SetValue",
            "componentId": "errorText",
            "property": "text",
            "value": "Unable to open (${event.source.value})"
          }
      }
    ]
  }
}


I believe I'm missing something but I could not find it.

When I try to open the same page on Silk browser of Echo Show, it displays properly.


alexa skills kitapl
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

ilker Aktuna avatar image
ilker Aktuna answered

I found a workaround to this using onMount.

Is this the correct method ?

if correct, then is there a way to hide the browser toolbar ?


{
    "type": "APL",
    "version": "1.8",
    "theme": "dark",
    "import": [
        {
            "name": "alexa-layouts",
            "version": "1.5.0"
        }
    ],
"mainTemplate": {
    "parameters": [
        "payload"
    ],
    "items": [
        {
            "type": "Pager",
            "id": "fisrtpager",
            "width": "100%",
            "height": "100%",
            "items": [
            ],
            "navigation": "none",
            "onMount": [{
  "type": "OpenURL",
  "source": "http://192.168.254.240/",
  "onFail": {
    "type": "SetValue",
    "componentId": "errorText",
    "property": "text",
    "value": "Unable to open Amazon.com (${event.source.value})"
  }
            }]
        }
    ]
}
}
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.