react-native-background-geolocation icon indicating copy to clipboard operation
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

Open karatekid430 opened this issue 3 years ago • 1 comments

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

  1. write react-native app using this library that displays current location accuracy in a screen (coarse / precise)
  2. 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

karatekid430 avatar Oct 20 '22 08:10 karatekid430

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.

christocracy avatar Oct 20 '22 12:10 christocracy

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jun 05 '24 01:06 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jun 19 '24 01:06 github-actions[bot]