0

I've created a new APL (Alexa Presentation Language) template using the Pager component and attached a "OnPageChange" event listener. I want this event to call another Command however it is never being invoked.

Reference to OnPageChange event mentioned in the docs here: https://developer.amazon.com/docs/alexa-presentation-language/apl-standard-commands.html#setpage-command

I have tried invoking a simple SendEvent to listen if the event is ever fired.

{
  "parameters": ["payload"],
  "items": [
    {
      "type": "Container",
      "item": [
        {
          "id": "pagerCanvas",
          "type": "Pager",
          "width": "100vw",
          "height": "70vh",
          "data": "${payload.pagerData.items}",
          "navigation": "wrap",
          "onPageChanged": {
            "type": "Parallel",
            "delay": 0,
            "commands": [
              {
                "type": "SendEvent",
                "arguments": ["${event.source.value}"]
              }
            ]
          },
          "items": [
            {
              "type": "Image",
              "width": "100vw",
              "height": "100vh",
              "source": "${data.url}",
              "scale": "cover"
            }
          ]
        }
      ]
    }
  ]
}

I expect a hit to my endpoint but receive nothing instead.

1 Answers1

0

I believe there is a typo/mistake in the Alexa docs. Changing the event name from "OnPageChange" (as referenced in the docs) to "OnPageChanged" fixed the issue.