Hello,

I updated your code on that site to be more "correct". You should
stick with the static variable instead of hardcoding the string "gps".

You get a null pointer because you have to provide a location first,
meaning run the KML, then you can call getLastKnownLocation. When the
emulator starts, without being given a coordinate, it has no last
location. So try running the KML then running your app.

If you are trying to get continuous updates of location you should
implement LocationListener instead.

Nick

On Oct 22, 11:42 pm, CSUIDL PROGRAMMEr <[EMAIL PROTECTED]> wrote:
> Hello,
> I am a newbie android developer. I am trying to simulate gps
> functionality in android sdk 1.0.
>
> I am using location manager  to get getlatitude function.
>
> http://pastebin.com/m56feb30c
>
> I am loading a google kml  through my ddms.
>
> I get a java null pointer exception.
> What am i doing wrong here
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
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