I've been developing a few Android applications over the past months,
and have recently had to code an app that gets data about the phone's
location and sends it off every minute or so. Obviously, I don't want
the GPS to be constantly on, but I want to start it every 30 seconds,
get the most accurate location (so give it about 20-30 seconds to
stream data back to the phone) and then turn off.

Currently (through reading a few online resources) I came to the
conclusion that using the LocationManager.removeUpdates() method would
be sufficient, as I could remove the Listener, and then 30 seconds
later, add it back again by using the
LocationManager.locationManager.requestLocationUpdates() method.

However, this doesn't appear to work. Whilst the first GPS location is
obtained easily, when I remove the listener and then re-add it, no GPS
readings are sent to the phone, even though the GPS icon is showing,
and appears to "fix" onto a location (i.e. it stops flashing).

Is this a problem with my approach, or is it a known phone bug (I'm
using a HTC Hero)? I'd appreciate any pointers you might have!

-Kind Regards,
Adrian

-- 
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