I have a problem with my location manager updates. Every time I quit an activity or when I quit the whole app location manager keeps updating location.
I wanted the app to keep updating location when the display is turned off so I used
@Override
protected void onPause() {
super.onPause();
if (this.isFinishing()) {
locationManager.removeUpdates(this);
}
}
I've put locationManager.removeUpdates(this);
even in onBackPressed()
method bud after quitting the activity by pressing back or quitting the app the manager is stil requesting updates.