Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define observation behavior when permission is revoked/granted #3

Open
inexorabletash opened this issue Aug 28, 2018 · 2 comments
Open

Comments

@inexorabletash
Copy link
Member

Cases:

  • permission not granted; event listener added; permission granted - do events start?
  • permission granted; event listener added; permission revoked - do events stop?
  • permission not granted; event listener added; permission granted; permission revoked
@inexorabletash
Copy link
Member Author

With the updated API shape (see #5):

  • permission not granted; event listener added; permission granted - do events start? - n/a, since you can't add a listener if the permission wasn't granted since you don't get the State object

  • permission granted; event listener added; permission revoked - do events stop? - answer should be: yes

  • permission not granted; event listener added; permission granted; permission revoked n/a

  • permission granted; event listener added; permission revoked; permission granted - do events resume? - ???

@reillyeon
Copy link
Collaborator

We've updated the shape of the API again. The start() method resolves only if permission is granted.

In the Geolocation API calls to the success callback will start after permission is granted and stop temporarily while permission is denied. This API also provides an error callback which will be notified of the permission denied event. The callback style is outdated however the Generic Sensor API provides both reading and error events but does not resume events when permission is re-granted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants