react-native-geolocation-service
react-native-geolocation-service copied to clipboard
[android] watchPosition success callback should be called after enabling device location
Currently when watchPosition
is enabled and user turns off location settings onError
callback is called immediately. But if user turns on location again onSuccess
callback is never called. Is there any way to achieve such behavior?
For now the only working solution I found is to set distanceFilter
option to 0
Did you mean it's not being invoked immediately ? If distanceFilter
is not zero, then it'll wait until user moves a certain distance and trigger success callback.
{ enableHighAccuracy: true, maximumAge: 0, distanceFilter: 10 });
I encountered this issue. User moves far enough but callback is not called. I must run the app again to its work.
I'm also having this issue. If someone finds a solution besides turning distanceFilter
to 0, please share it. It shouldn't wait till a location update happens for calling onSuccess
callback. I have an app with tools that depend on the user location. If the onError
callback is called, this tools are disabled. I depend on onSuccess
callback to turn them back on