5

I have an Android application with a widget that uses the fused location provider API to keep track of the user's location. The widget works fine on most of the cases but sometimes, users report that the widget reports a wrong location, many miles away.

I have confirmed that this problem is caused by bad network connections (either wifi or cell) because if users connect from another location or using a different method (wifi to cell for example), the location is detected correctly.

In all cases though, users report that Google Maps show the correct location, even when my application displays the wrong one. Is there a way to prevent the wrong location from being displayed, for example filter out erroneous locations? How does Google do it?

The code I am using is from here https://developer.android.com/training/location/receive-location-updates.html.

Thanks

a.p.
  • 3,248
  • 7
  • 30
  • 48
  • This most likely happens because of the nearby cell tower with firmware set to report wrong position. The only solution I can think of is to ignore network locations until the gps location will arrive, and then filter out locations that are far away from gps. Have you come to some other solution for this problem? – Kurovsky Oct 31 '16 at 09:40
  • Not really. I cannot afford to wait for a gps location since the user may not be using the gps, I guess there is no solution to this problem at the moment. Any other suggestions would be appreciated. – a.p. Feb 05 '17 at 07:21

0 Answers0