2

I am developing an app that tracks the locations of the device. Everything was fine and working as expected. Google now recommends using the new Fused Location Provider. With this I now from time to time get Positions with an accuracy > 500m that also are fairly off the track. This in an urban area with good visibility to the sky - so GPS is usable (and works with the android location provider without problems).

So my question is: How to limit the location-updates to results with the requested accuracy?

Sqrt-1764
  • 321
  • 1
  • 17

1 Answers1

0

If you want high accuracy location to your application, you should create a location request with setPriority(int) set to PRIORITY_HIGH_ACCURACY and setInterval(long) to 5 seconds. Make sure also that your phone's location priority is high accuracy. FusedLocation API may be accurate for general location applications but it is not accurate enough for real time tracking.

Check this SO question which might help.

Community
  • 1
  • 1
abielita
  • 13,147
  • 2
  • 17
  • 59
  • If you look at the title of my question you see that I already use PRIORITY_HIGH_ACCURACY (and the interval is set to 30 seconds - but IIMHO that should not matter) Also my device is set to use location requests with high accuracy. (And using the android location api works as expected and does not return inaccurate positions.) Google recommeds this new API for location requests - so it has to cover also the tracking use case! – Sqrt-1764 Feb 19 '16 at 13:56