I have a mapView activity that has a LocationListener registered to check for a new location every two seconds. When I press the back button to go back to the main screen of the app the gps continues to check for a location every two seconds. Does the listener not get stopped when the Activity stops? If not how can I handle this? I currently have not overridden onStop().
private final LocationListener locationListener = new LocationListener() {
public void onLocationChanged(Location location) {
updateWithNewLocation(location);
}
public void onProviderDisabled(String provider) {
//TODO do something to handle when the provider is disabled
}
public void onProviderEnabled(String provider) { }
public void onStatusChanged(String provider, int status, Bundle extras) { }
};