I got this little line(s):
int meter = 1;
update 5000; //1 ms
globalconstant.mlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, (long) update, meter,globalconstant.mlocListener);
can someone tell me what is that mean ? Is that mean the gps update time is 5 second and if there’s a location change 1 meter it refresh in 5 sec maybe 4 times if i 4 times move 1 meter in 5 sec ?
iirc it means that it will check for location once every 5 seconds, and after each check, if you have moved more than 1 meter, it will notify the mlocListener. (if you haven’t moved more than 1 meter, it will not notify)
This means you will get at most 1 update every 5 seconds – but it might be less (ie if you’re not moving, your app won’t get location updates).
At least, that’s how it should work. Given GPS inaccuracy, etc, you may end up getting location updates even when you’re standing still (I think – been a while since I played with the GPS code)