3

A data collection app that used LocationManager directly was updated to use FusedLocationProviderApi. With LocationManager, most devices quickly report 5m accuracy or better when collecting location. With FusedLocationProviderApi, the best accuracy ever reported is 10m.

I have just installed a location demo app and see the same behavior (https://github.com/will-quast/android-location-demo). In the Fused Location activity, if I only show GPS location, the accuracy changes as I get a better view of the sky and it can go down to 2m. If I only show fused, I get the same point as reported by LocationManager. This makes sense -- I have Android set to use GPS only for location and priority is set to PRIORITY_HIGH_ACCURACY so I expect the two points to always be the same. But the best accuracy ever displayed is 10m with the fused provider.

Why does the fused provider never report an accuracy less than 10m? Is this documented somewhere? Is there any way around it or should LocationManager always be used when a sense of accuracy is needed?

FusedLocationProviderClient is not currently an option because it requires an update to Google Play and this app is used in resource-constrained areas where a Google Play update is prohibitively large. It would still be useful to know whether it does report sub-10m accuracies. It also never reports an accuracy below 10m with Android settings set to use GPS only.

Edit 4/9 - Related questions:

Hélène Martin
  • 1,409
  • 2
  • 15
  • 42
  • can you add some code if you don't mind? – Android Mediocre Mar 15 '18 at 01:09
  • @G.Dator See https://github.com/will-quast/android-location-demo/blob/master/application/src/main/java/com/williamquast/androidlocationdemo/FusedLocationActivity.java and https://github.com/opendatakit/collect/blob/9b7cabc55fa4acae9b172f872ccc9f2d5e46f0b3/collect_app/src/main/java/org/odk/collect/android/location/client/GoogleLocationClient.java – Hélène Martin Mar 15 '18 at 01:46
  • @Hélène Martin: What accuracy you are getting? – Jitesh Mohite Mar 21 '18 at 10:15
  • @jiteshmohite With `FusedLocationProviderAPI` I get an accuracy of 10m. With `LocationManager` I get an accuracy of 2m. – Hélène Martin Mar 21 '18 at 17:40
  • Would love some insight into why this question was down voted so I can write better questions in the future! – Hélène Martin Apr 09 '18 at 20:29
  • @HélèneMartin the issue has been reported here https://issuetracker.google.com/issues/79189573 – Paranoid Android Oct 05 '18 at 09:43
  • 1
    I answered a similar question here https://stackoverflow.com/questions/49348489/cordova-geolocation-accuracy-gets-capped-at-10-meters/52663008#52663008 – Paranoid Android Oct 05 '18 at 12:46
  • Good to know we weren't all going crazy! Doesn't feel like a great idea to trust `FusedLocationProvider` anymore, though. – Hélène Martin Oct 05 '18 at 16:10

2 Answers2

1

No. It is best effort only. No guarantee.

If you have a good devices, and in a location which has large number of Android user. (which for example, SSID database will become more accurate), it can go to 2-3m accuracy.

Otherwise, mixing location information from different source will have a larger variance, and result as lower accuracy.

e.g. Source A accuracy is 5m. Source B accuracy is 15m.

Using Source A alone of course accuracy is 5m. But if mixed A and B, the accuracy of course will be >= 5m. (consider adding noise to clean data)

Fung
  • 961
  • 1
  • 8
  • 17
  • 1
    Thank you, that does make some sense though it is surprising that given a high-accuracy source it still mixes, especially when Android settings say to use GPS only. The 10m limit seems like a hard one when the device is set to use GPS only. Do you know why? I can't find the source for `FusedLocationProviderApi`, is it available? – Hélène Martin Mar 22 '18 at 19:59
  • 1
    Even if A and B with same accuracy, what if A and B are telling you different result? It will be giving you a lower accuracy answer. (larger radius centered in the avg of A and B may be) Have you try turning off wifi and remove sim card? Google Play Services is not open source. – Fung Mar 23 '18 at 08:16
  • You're absolutely right that if two sources are available the behavior makes sense. If Android settings are set to GPS only, I would expect it to use the sole source, though! Turning off wifi and leaving out the SIM card results in the same behavior (hard stop at 10m accuracy). I didn't realize Play Services wasn't open source, thank you. – Hélène Martin Mar 23 '18 at 16:35
  • 1
    We are experiencing the same issue, see https://stackoverflow.com/questions/49348489/cordova-geolocation-accuracy-gets-capped-at-10-meters – Paranoid Android Apr 09 '18 at 10:34
0

This was confirmed as a Google Play Services bug on the Google issue tracker. A fix that allows accuracies down to 3m is projected for Play Services 13.4.0. It's unclear why it will be capped at 3m rather than using the accuracy reported by the raw location source.

Hélène Martin
  • 1,409
  • 2
  • 15
  • 42