Now it works fine. I Was just doing the requestLocationUpdates after the
getting location. as you said, we first need to turn on the GPS radio .

2009/10/17 Mark Murphy <[email protected]>

>
> Auguste Lunang wrote:
> > I can't display my map on android emulator.
> > i have,
> >                 locationManager = (LocationManager)
> > getSystemService(Context.LOCATION_SERVICE);
> >         location = locationManager.getLastKnownLocation("gps");
> >
> > After those lines,the Log  shows null for location instead of the object
> > location
>
> You need to do something, such as requestLocationUpdates(), to turn on
> the GPS radio. And, unless something else has had the GPS radio on, you
> will still not have a location until GPS has obtained a fix, which may
> take several seconds, or tens of seconds. In the case of the emulator,
> you will not have a fix until you use DDMS to supply a fix, after the
> GPS radio is "on".
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android Development Wiki: http://wiki.andmob.org
>
> >
>

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