I’m trying to get my current GPS accuracy by using Location.getAccuracy(). However, this is returning 1 (or sometimes 2) which doesn’t seem possible. Google maps is telling me my current location accuracy is 40 meters.
Any thoughts?
int accuracy = (int) loc.getAccuracy();
// This will give me accuracy = 1
From the documentation of getAccuracy:
Why doesn’t it seem possible? A return-value of 1, sometimes 2 meters, is perfectly fine for GPS. With a good signal strength, and locks on multiple satellites, you can get that kind of accuracy.
(Besides, since you’re casting to an
intyour flooring the value. The accuracy may actually be for instance 1.9 meters.)