Working with the Location Manager in Android, nce you first call the requestLocationUpdates, the value you pass it to select the refresh time can be changed?
Let me explain. Here we have what I’m doing (and works perfect):
(...)
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, GPSrefresh, GPSminDistance, locationListener);
(...)
public void onLocationChanged(Location location) {
// Do what you want to do
}
If, after some time, I change the value of GPSrefresh, Is it going to affect to the locationUpdates? Is it always checking the value of GPSrefresh or it just did it the first time it was called?
Thank you very much.
you are passing values to a method
requestLocationUpdatesofLocationManagercalss and then updateing that value..so it will not affect the previous method call..Like,
String tmp=”Mango”;
Fruits.add(tmp);
tmp=”Apple”;
in above only Mango will be added..to add Apple you will have to call Fruits.add(tmp) again,
Same way..IF you cange value of GPSRefresh you will need to call the method
requestLocationUpdatesagain with the new updated parameters.