i want location after certain time in android not when i move from one place to another
i want to to get location after certain time so i can define minimum time in method requestslocationupdates. for example i write 60 seconds so i want to get locaiton after 60 seconds. here i got it. but problem is there when i move from one place to another place so also getting locaiton but i dnt want this. i want only location after some interval..
my code is here.
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
locationListener = new GPSLocationListener();
Criteria criteria = new Criteria();
//criteria.setAccuracy(Criteria.ACCURACY_COARSE);
//criteria.setAccuracy(Criteria.开发者_JS百科ACCURACY_FINE);
provider = locationManager.getBestProvider(criteria, false);
locationManager.requestLocationUpdates(
provider,
0,
0,
locationListener);
locationManager.requestLocationUpdates(provider,60000,0,locationListener);
精彩评论