I'm trying to figure out a refresh rate to use for my GPS location listener to get around a bug on the HTC Hero where the GPS icon won't remove itself off the notification bar.
http://groups.google.com/group/android-developers/browse_thread/thread/e687b3bfa9146f31/7fa59b0108bbdf89?lnk=gst&q=gps#7fa59b0108bbdf89
Does anyone here have any suggestions? For my app, I'd normally run with a refresh rate of 5 minutes. But when I close the app, and de-register my listeners, the GPS icon sometimes still stays on the notification bar. Does anyone have an HTC Hero and can confirm this?
The link above suggests that using a refresh rate of under 35 seconds fixes the problem, but not sure if that's true.
Thanks
Try to removeupdates of your location manager in the onDestroy method of your activity tp remove the gps icon.
Just like this..
@Override
public void onDestroy() {
super.onDestroy();
locationManager.removeUpdates(this);
}
where locationManager is of type LocationManager.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With