Do we need to ask Google assistant for permission every time?

619 views Asked by At

I am building an app that requires Device( Google Home/ Phone ) location. Do we need to request for permissions each time?

2

There are 2 answers

5
AdamK On

Unlike mobile phone app permissions systems, there is no memory of if a user has previously granted your app a permission. So one option is to ask every time. A better option is to store the result in your backend for future use. However, you should avoid storing sensitive data (such as precise location) due to user privacy issues.

If, for example, you are wanting to store nearby train stations, you could ask for their location via the permission, query for nearby train stations using that location and then store the nearby train stations against their userId.

2
Prisoner On

Unfortunately, yes. See Google Assistant location permissions not stored between requests

Where possible (ie - for the name) you should cache this against the UserId.

Clearly this isn't reasonable for location. I usually suggest coming up with a set of phrases to use to ask for location instead of just one to at least mitigate how frustrating it can be for the user.