tags:

views:

19

answers:

1

I launch an activity from another activity with a startActivityForResult. This activity gets a LOCATION_SERVICE. All works very well up to the point where I upload the app to my hardware. It works ok there, as well until I shut the app down. The LOCATION_SERVICE appears to continue running and even continues to give me Toast updates until I turn the droid off. Is there an explicit 'release' call for the GPS or is one my 'finish' calls in error? Thanks in advance...

A: 

This activity gets a LOCATION_SERVICE

It presumably does more than that.

Is there an explicit 'release' call for the GPS or is one my 'finish' calls in error?

Yes. However, it depends on what you did with the LocationManager in the first place. For example, if you called requestLocationUpdates(), you need to call removeUpdates().

CommonsWare
First, thank you for the response. Yes, I am am calling the requestlocationupdates and I do call removeupdates with the respective listener. Maybe the call is not seen by the activity because it is in a nested class; First I just wanted to make sure that there was no explicit "release this resource" type call that I'd neglected. The compiler doesn't flag the call as out of scope but maybe it still doesn't get through to the appropriate thread or process. I welcome any more points of view and appreciate this one.
GhostSpace