Why does FusedLocationProviderApi never report acc

2019-01-26 19:09发布

问题:

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:

  • Dramatic shift in location accuracy distribution starting February 15
  • Wierd and very unexpected issue with location.getAccuracy()
  • FusedLocationApi Performance Issue: Accuracy seems capped at 10.0 meters
  • Cordova geolocation accuracy gets capped at 10 meters

回答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)



回答2:

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.