react-native-background-geolocation
react-native-background-geolocation copied to clipboard
Android binary blob has bug causing it to not call the callback when Android >= 12 location changes from precise to coarse or vice-versa
Android >= 12 specific
Toggle the location from precise <> coarse and vice versa, the callback:
private class LocationProviderChangeCallback implements TSLocationProviderChangeCallback {
Is not fired. It only fires once when the app starts.
Expected behaviour should match iOS and update when location accuracy is changed
Actual behaviour is that callback is not fired, react-native is not informed of the change
- write react-native app using this library that displays current location accuracy in a screen (coarse / precise)
- note how it updates in iOS when setting is toggled, but not in Android when setting is toggled
We narrowed it down to the location manager binary blob with a fairly high certainty. Our current app which is in the store appears to suffer from the problem and it uses 3.9.1. The problem is also present in 4.4.4, and 4.8.2 (latest as of now) which I upgraded to.
We can provide more specific information upon request but hope this is enough to fix the issue. Android only got this ability relatively recently, and it's possible that something slipped through the cracks.
Thanks for any help
Expected behaviour should match iOS and update when location accuracy is changed
That’s correct. iOS does not record a location when location-provider changes. It’s a long story about why.
you’re free to call .getCurrentPosition() yourself in the onProviderChange event.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.