>>>>> "T" == TreKing  <[email protected]> writes:

   T> On Fri, Feb 18, 2011 at 9:20 AM, Jake Colman <[email protected]>
   T> wrote:
   >> But doesn't the device always know where it is - assuming it has a
   >> GPS, WiFi or network connection?
   >> 

   T> Having those features doesn't mean much if they're not actually
   T> used. If nothing on the device is requesting it's location, why
   T> would the device update it's location? getLastKnownLocation gets
   T> you exactly that - the location the device last knew it was at,
   T> which is the last time a location update was requested by some
   T> app.

   >> Other than getLastKnownLocation() is my code a reasonable paradigm
   >> for getting the best available location fix?
   >> 

   T> Not really. If I used my device's GPS in Tulsa, Oklahoma then
   T> stopped using it, took a flight back to Chicago and ran your app,
   T> your app would think I was still in Tulsa.

   T> Use requestLocationUpdates as Mark already said.

I am about to reread Mark's chapter on Location Provider from his Busy
Coders book.  If I put my listener only asks for Network updates (coarse
location) it will still hear GPS updates too if available? And in the
unlikely event that it has GPS but no network, will I still get a
location?

-- 
Jake Colman -- Android Tinkerer

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