I want to get my coordinates every minute, even if the user is not moving. Therefore, I used requestLocationUpdates with the following parameters:
locMgr.requestLocationUpdates(
LocationManager.GPS_PROVIDER,
60000, // minTime in ms
0, // minDistance in meters
PosljiLokacijo.this);
But when I test it on my HTC Hero (2.1 Android), and I don't move, onLocationChanged () is never called. If I change minDistance to 1, I get a few updates at the beginning, but after that they happen very irregularly.
How do I select these 2 parameters (minTime and minDistance) to get the coordinates every minute?
source
share