-
Notifications
You must be signed in to change notification settings - Fork 153
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
mdg:geolocation ~ position won't be watched / asked again after error #62
Comments
I can reproduce this bug. To replicate, eg on Android:
It would be preferable if this package picks up on the fact that the permissions changed and it can now access GPS. |
@lorensr in case you need a quickfix, it's pretty simple to roll your own "geolocation api", in my case i preferred to have it as an event emitter and just call "start" when i actually need to ask for permissions. https://gist.github.com/hems/52823bf5a63d842abfee |
Okay, so solution is to repeat the |
@lorensr i believe so, my solution isn't 100% ideal as well, but it did the job of asking permissions again if you go change your settings and come back to the app. need some fine tuning though, once i make sure it's 100% i'll do a pull request |
When onError is triggered we should set
watchingPosition
to false, so then we can call startWatchingPosition again ( and try to fetch the location again ).At the moment if i received a TIMEOUT error, it doesn't retry and it seems that the app will only update the position if you refresh the page, when you could actually just call watchPosition again and get onPosition callback called.
The text was updated successfully, but these errors were encountered: