alexa-js / alexa-app

A framework for Alexa (Amazon Echo) apps using Node.js
https://www.youtube.com/watch?v=pzM4jv7k7Rg
MIT License
1.03k stars 212 forks source link

Multiple commands in one session #123

Open chearmstrong opened 7 years ago

chearmstrong commented 7 years ago

I'm using Alexa to navigate my menus in Kodi. After asking Alexa to "ask Kodi to navigate", I want to be able to say up/down/left/right/select without having to invoke "ask Kodi to navigate" again.

When it's invoked, I'm using:

response.shouldEndSession(false).say('ok, say done when you\'re finished').send();

Then, for when Alexa hears each command (up/down/left/right/select), I'm using:

response.shouldEndSession(false).send();
// then invoking the command on Kodi

The issue I have is that I can only seem to say 1 navigation command, then the session stops... Is it possible to have it run until I do response.shouldEndSession(true).send()

Am I going wrong somewhere - Is it possible to have Alexa wait for other commands?

dblock commented 7 years ago

I've never made it work for multiple commands, but theoretically shouldEndSession(false) should have been doing it. Maybe an AWS discussion forum will have an answer? Keep us posted?