Is the GPS provider running? If nothing has called one of the
LocationManager#requestLocationUpdates methods, which can start the
GPS provider, then LocationManager#getLastKnownLocation will return
null. The getLastKnownLocation method does not start the provider. It
returns null if the provider has never been started and never gotten
any location.

On Feb 1, 3:55 pm, cellurl <[email protected]> wrote:
> I used to be able to use the GPS inside DDMS, now it doesn't work...
> Using English/Eclipse/Vista. Everything updated in eclipse->help-
>
> >check for updates.
>
> This always returns null:
> loc = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
>
> Not sure what you will ask, so here goes: Using:
> Google APIs Platform=2.0.1 API Level=6
> AVD details:
> hw.gps: yes
> hw.lcd.density: 160
> w.audioOutput: yes
> hw.camera: no
>
> I don't see any errors in console. The last thing it says is:
> Attempting to connect debugger.
> My app comes up fine, just the GPS is dead...
> In eclipse, I go into DDMS, Emulator Control, enter lat, lon =
> -120.0,35.0 and hit send.
> Nothing happens.
>
> I have tried to update to the latest and remove all old stuff, but no
> joy...
> Any inspiration appreciated
> jim

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