I have an Android app with widgets that use a smooth location API to track a user's location. The widget works fine in most cases, but sometimes users report that the widget reports the wrong location, many miles away.
I have confirmed that this problem is caused by poor network connections (Wi-Fi or Cell), because if users connect from another location or use a different method (e.g. Wi-Fi per cell), the location is detected correctly.
In all cases, users report that Google Maps shows the correct location, even if my application displays the wrong one. Is there a way to prevent the display of the wrong location, for example, filtering out the wrong locations? How does google do this?
The code I use is here https://developer.android.com/training/location/receive-location-updates.html .
thanks
source share