I am designing a location based program for Android and I am having a
problem. Right now I am just trying to retrieve the GPS coordinates
and display them to the screen. I put the following code in my program
and now whenever try to run it in the emulator the program crashes and
I have to force quit.

       LocationManager mylocation =
(LocationManager)getSystemService(Context.LOCATION_SERVICE)
       mylocation.requestLocationUpdates(LocationManager.GPS_PROVIDER,
0, 0, this);

If i comment out the second line the program runs, but obviously i
can't retrieve the data I need without it. Any suggestions? help would
be much appreciated. thanks.

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