-3

We have a ReactNative app, running on both iOS and Android. We developed our own native module for GPS updates. On iOS, it's working OK ! On Android, we're using FusedLocationProviderClient.

My problem: in some very rare cases on android, less than a few % of our GPS data, we see GPS data with correct latitude, but longitude keeps jumping around the real one (e.g. this seems to happen on some Samsung S9+)

See this screenshot This screenshot

This bug only last a few minutes, then seems to resolve on its own...

Has anyone encoutered this bug too ?

If so, how did you fix it ?

(note: I can add code samples if you think it can help, but I'm having big difficulties reproducing this bug myself, so I doubt it's useful in this case...)

Vinzzz
  • 11,746
  • 5
  • 36
  • 42

2 Answers2

-1

GPS takes awhile to lock, and depending on the phone, it can take quite awhile and be unreliable. The best thing you can do is check the accuracy that is reported, and also live poll the user's location when they open a relevant activity so by the time you need the location, it most likely has an accurate lock.

Also if needed, ask the user to apply their highest location accuracy settings. Details on how to do this can be found here

Adrian Le Roy Devezin
  • 672
  • 1
  • 13
  • 41
-1

GPS takes some time to latch, and there should be at least 3 satellites to be able to latch for the device, if the user is indoor, it is nearly impossible to latch. You will have to check for the accuracy, on testing I have found that if accuracy value becomes 2.9 (may be different on different devices, but till now I haven't seen) then your device location is set. Or give some time to devise and record coordinates when you think it's feasible depending upon accuracy.

Hope this may help you...

Abdul Aziz
  • 442
  • 5
  • 12