How to keep an alexa skill open?

Vishnu picture Vishnu · Jul 4, 2016 · Viewed 11.9k times · Source

I have created a skill so that people can keep track of some state. But instead of asking alexa everytime to open the app and interact.

alexa ask grocerylist to add 2 eggs
alexa ask grocerylist to add bread

I would want to keep the grocerylist skill open so that users can interact with it until they ask it to close

alexa open grocerylist
.... 2 mins later
add 2 eggs
.... 1 min later
add bread

Is there a way to do this without having to use alexa ask grocerylist every time.

Answer

Joseph Jaquinta picture Joseph Jaquinta · Jul 5, 2016

This is not possible. It is a security feature so 3rd parties cannot create a skill to "listen in" on everything someone is saying. You can respond, and if you don't set the "endSession" flag, it will keep the session open. But it will only remain open for about 8 seconds. If you have set a reprompt, it will read them the reprompt at that point and stay open for another 8 seconds. So the maximum you can keep the line open for is 16 or so seconds.