Monday, August 30, 2010

[android-developers] Re: How Write a background service to get latitude and longitude

In the name of expediency, it's best to start both listeners
simultaneously and then wait for a set period (like 30 seconds) before
deciding on which one to use. I find this to be the most accurate. If
you wait for the GPS to time out before starting the network listener,
you waste a full 30 seconds to a minute. The code is a bit more
complicated but the result is the most efficient location function.
You can see Google Maps doing this when you look at the map app. The
blue circle starts out really big, then once GPS kicks in, it shrinks.
If GPS isn't available, no time is wasted as the network fix is fast.

-John Coryat

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