This is a problem that is quite the opposite of the “regular” use of the GPS. The goal is to have the gps read or “fix” at a very precise rate (when available) across the multitude of devices that exists. So until now I believed that the timing parameter in e.g.
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 2000, 1f, this);
would take care of this for me. But behold, when testing on a Nexus S and Galaxy Nexus I got completely different behavior, almost opposite (minimum time between reads in one case, maximum in the other). Why is this, and what could be done to fix it?
If you read the documentation, you will see that the
minTimeparameter torequestLocationUpdates()“is only used as a hint to conserve power, and actual time between location updates may be greater or lesser than this value”.You come up with a new design that makes no assumptions whatsoever about the availability and frequency of GPS fixes.