On Thu, Aug 12, 2010 at 12:35 PM, netlander <[email protected]> wrote:
> Is there a simple way to stop GPS when a user navigate away from an
> activity?

Call removeUpdates().

> I have tried the LocationManager's removeUpdates() but this
> doesn't actually stop the GPS (the icon is still flashing on the
> status bar and draining the battery).

It will do that in the emulator. It should not do that on the device.
If the GPS icon is visible on a device, something has an outstanding
request for location updates (e.g., Google Maps).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to