Hey Guys,

I am getting this message(THe Method getCurrentLocation(string) is
undefined under LocationManager) trying to use Location
current_location = lm.getCurrentLocation(provider);


My code looks like this
 String provider = "gps";
       LocationManager lm =
          (LocationManager)getSystemService(Context.LOCATION_SERVICE);

    //    this.myLocation =
lm.getLastKnownLocation(provider.getName());
        Location current_location = lm.getCurrentLocation(provider);

        final String lat =
String.valueOf(current_location.getLatitude());
        final String lng =
String.valueOf(current_location.getLongitude());

Can anyone help.

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to