Marcin Bortel
Marcin Bortel

Reputation: 1259

GPS location change but device not moving

i want to know that if this is normal behavior when phone is not moving but GPS location data is changing? Difference is between 2m to 900m.

Upvotes: 2

Views: 2557

Answers (2)

Oguz Ozcan
Oguz Ozcan

Reputation: 1714

There are three methods for getting location:

LocationManager.NETWORK_PROVIDER
LocationManager.GPS_PROVIDER
LocationManager.PASSIVE_PROVIDER

When you ask for location by getLastKnownLocation, location provider use the best provider to get the location data. This might change according to your criteria so location data could change.

criteria.setAccuracy(Criteria.ACCURACY_FINE);

This setting will make your location more accurate.

Upvotes: 1

Farhad
Farhad

Reputation: 12996

GPS has inherent imprecision, so I would expect slight variations. I don't know why it would keep changing when you turn of GPS, though as noted by the other answers, it's probably using an alternate source like WiFi triangulation.

My phone is not moving, but GPS data still changing

Upvotes: 0

Related Questions