Reputation: 2826
I'm trying to add cards to my skill, but have hit a weird snag. I can get cards to show up fine with a LaunchReqest, but the minute it hits an intent request, the cards stop showing.
The code for showing the card is the same as the code for the LaunchRequest:
return handlerInput.getResponseBuilder()
.withSpeech(speechText)
.withSimpleCard("HelloWorld", speechText)
.withReprompt(speechText)
.build();
Literally just a simple response with a Card I'm trying to get to show. This appears in the JSON that Alexa gets:
(Amazon doesn't let you copy from the console.)
This is in the dev console, my best guess currently is it is just a dev console bug, and not a real bug, but we haven't yet tested on a real device with the companion app, so I could be wrong.
Any direction here would be helpful, from all my reading online this should work, especailly since the same text works in a LaunchReqest, but not in an IntentRequest.
Upvotes: 3
Views: 1037
Reputation: 4387
Cards are shown in companion Alexa Apps of the skill users. The response JSON you have shared looks good and cards should be displayed. Try logging into mobile app with your developer.amazon.com
credentials and check the whether the cards are displayed. (Cards are displayed in the home section of Alexa app). If you don't have an Alexa app, you can use the web version at alexa.amazon.com
The cards are stuck in Alexa Test Console. It looks like the first card that is shown remains there forever. It's not getting refreshed.
BTW you can copy JSON from Alexa Test Console 😉
Upvotes: 5