Skip to content Skip to sidebar Skip to footer

Google Play Services Location Api Sometimes Give Wrong Location

My app use Google Play service API to get the user location and check if the device is inside or outside a particular area of 50 mt of radius. The app use PRIORITY_HIGH_ACCURACY a

Solution 1:

There's always a chance of it being wrong. An accuracy of 200m doesn't mean its within 200m- it means there's a 67% chance you're within 200m. There's still a 1/3 chance you aren't.

Since most of the Google Play location providers are fused (use GPS and wifi/cell data), yes being very close to a tower could screw with the data.

Solution 2:

Change setInterval(60000) to setInterval(20000) or to 5000.

Since the interval is one minute, you won't get updates even if the user moves. That's why there is an inaccuracy.

According to Google, setInterval(long) means - set the interval in which you want to get locations. setFastestInterval(long) means - if a location is available sooner you can get it (i.e. another app is using the location services. Means, if no other apps are using the location service, you will get updates only after a minute).

Post a Comment for "Google Play Services Location Api Sometimes Give Wrong Location"