Announcement: The Alexa Skills Community Is Moving To Stack Overflow

For improved usability and experience, Alexa skills related forum support will be transitioned to Stack Overflow. Effective January 10, 2024, the Amazon Developer Forums will no longer be available. For continued Alexa skills support you can reach out to us on Stack Overflow or via Contact Us.

question

Phil McGee avatar image
Phil McGee asked

Widget Shortcuts and changed onDisplayStateChange

I have 2 widgets in my live skill and both use this construct to detect when the widget is swiped into view so as to request a datastore refresh from the skill Lambda:

  "onDisplayStateChange": [
    {
      "type": "Sequential",
      "sequencer": "displaySequencer",
      "commands": [
        {
          "when": "${event.displayState == 'foreground'}",
          "type": "SendEvent",
          "arguments": [
            "WIDGET_${event.displayState}"
          ],
          "flags": {
            "interactionMode": "INLINE"
          }
        }
      ]
    }
  ]


With the new widget shortcut icon to launch a widget (instead of the old swipe-into-view), this event is no longer being sent. Is this a deliberate change or is something broken in the new shortcut system?

A workaround is to send an event via onMount but I'l wondering why something that used to work now stopped functioning as it did. Release notes would be nice.

alexa skills
10 |5000

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

0 Answers