Sven Jacobs wrote:
> 2010/3/20 Mark Murphy <[email protected]
> <mailto:[email protected]>>
> 
>     DDMS/geo only sets a simulated GPS fix (AFAIK -- that's certainly DDMS'
>     behavior), and you have not turned on the GPS radio. You need to
>     requestLocationUpdates() to turn on GPS, then set the fix. Then, your
>     LocationListener will be notified of the fix, and after that point
>     getLastKnownLocation() can return it as well.
> 
> 
> Hi Mark,
> 
> thanks for the hint! After applying requestLocationUpdates() it works.
> But I still find this strange and it's not documented that a single call
> to getLastKnownLocation() if I'm not interested in constant location
> updates won't return a value.

It's more that if the location technology is not on,
getLastKnownLocation() won't return a value. GPS is a battery hog, and
so it is off unless something in the system has said "yo! I want GPS on,
please!".

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Training: http://commonsware.com/training

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to