I'm creating an application which uses locationManager()
to handle updates from the GPS. When the app is closed, I want the updates from the locationManager to stop and has this piece of code at the moment.
@Override
protected void onPause() {
super.onPause();
if(locationManager != null){
locationManager.removeUpdates(locationListener);
}
When I exit the app with the back button, onPause() is called and the GPS stop. Nothing weird here. But, if I press the home button, the GPS marker in the status bar remains visible, even though onPause is called just the same.