When developing a location-aware Android application using a LocationListener
, is it obligatory to call LocationManager.removeUpdates()
before the application finishes?
Or more generally, is it obligatory to call LocationManager.removeUpdates()
before the Looper
passed in LocationManager.requestLocationUpdates()
quits?
Does the LocationManager
automatically find out that the Looper
is no longer alive and location updates are no longer necessary? If yes, how? If not, will it keep blindly updating (and draining the battery) forever?