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.
Currently, to use the Alexa App hands-free, you have to leave the screen unlocked. However, it's easy to change your settings to manually lock your device. On Android devices, go to Settings and choose Display. Tap “Screen timeout” and select “Keep screen turned on.”
It's called Follow-Up Mode and it lets you give multiple commands to an Alexa smart speaker like an Echo Dot without having to say the wake word each time. (It works with at least some third-party Alexa devices as well.) Here's how to use it.
Open your skill in the developer console. Go to the Build page, and scroll down to Permissions on the lower left. Toggle the permission on for the permission that corresponds to the information your skill requires.
It's essentially a form of 20 questions, where you select a character and answer a series of yes-or-no questions and Alexa tries to guess who you're thinking of. To start a game, say, "Alexa, open Akinator." The game will immediately start, and you will need to answer each question with a yes or no.
Of course this is possible! (But may be capped at maximum of around 8 seconds per @Bill's comment)
In your response, when calling buildSpeechletResponse
, set shouldEndSession
to false
in order to keep the session open and keep listening for more utterances without needing to launch the skill again using "alexa ask MyApp..."
Various demos will show how to do this. e.g. See sample code here: https://github.com/amzn/alexa-skills-kit-js/blob/master/samples/savvyConsumer/src/AlexaSkill.js
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.
It is possible but only for a limited time.
Based on the sdk you are using you can set the flag (should end session = false). This is already done in an ask response. If you add a reprompt with that flag set then you can keep the session open until reprompt speech.
So totally intial 8 seconds until reprompt and 8 seconds again after reprompt. Total of 16 seconds.
You will have to remember the session and session variables go away after the session ends (when the blue light on alexa echo goes away). So if you want to maintain the state or the grocery list I would recommend having storage like a db. If you are using lambda to host an endpoint then it has a dynamo Db that you can use to store data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With