Wayne Wenthin wrote: > I told you my brain was fried... To re-paraphrase an ad slogan, there's a schnapps for that.
:-) > On getLastKnownLocation Of course > now that I look at the code I probably should be firing the > getBestProvider earlier. The most flexible approach is to use getBestProvider(). If that returns null, then the user has locked you out of all available options and you're outta luck. If that returns non-null, you can use that with getLastKnownLocation()...but depending on the choice, that may always return null. Instead, once you have the provider, register for location updates. That will force the provider to start actually attempting to acquire fixes (e.g., GPS radios will turn on). You can then either use the fixes your location listener gets, or call getLastKnownLocation(). How long it takes, though, may vary. If GPS is the provider, for example, it could have fixes in a couple of seconds (outdoors), in tens of seconds (indoors), or never (Batcave). However, your listener will be notified when the first fix is available, so you will know when locations are ready for use. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- 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

