Reputation: 498
I have an intent right now that requires the users location - each time this intent is triggered it prompts the user for access to their location. While I understand the reason behind this - it is a little cumbersome and frustrating for the end user - who may use this intent 10 or more times in a day.
Question: Can I store the users location pemission / preference for late use, or am I required to ask them for permission each time?
Something like this was my thought:
app.intent('user_locate', (conv, params, granted) => {
return new Promise(function (resolve, reject) {
if (granted) {
conv.user.storage.location = granted;
}
});
});
Upvotes: 1
Views: 48
Reputation: 50741
You cannot store that they have granted you permission to access their location. Each request for their location must be approved by the user.
In some cases, however, you may be able to just store the location. There are, however, some things you should consider before doing so:
Upvotes: 2