Wednesday, August 10, 2011

[android-developers] Android Location Update every 30 seconds

If I determine the phone is active by reading the accelerometer, I
want to update the location of the phone every 30 seconds. If after a
while, I determine it's not moving, I stop the location updates.

Is it better to leave a LocationListener on during that time, or is it
better to register a LocationListener every 30 seconds, get an update,
and unregister?

For both methods, I would timeout after a while if I can't get a
location update. I want to know which method is better in terms of
both getting consistent updates and battery life.

And I'm trying to get updates through GPS satellites, not network,
even though I know network is faster and less battery consuming, but I
need to get it through satellites. Please keep that in mind.

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

No comments:

Post a Comment