Hello guys,
i am very much new to android platform. i am trying to implement some
codes from Android: A Programmer’s Guide. i have installed latest sdk
thats why there are some issues regarding deprecated apis. when i was
trying to call getCurrentLocation() i got error , that this method is
not supported by LocationManager.So i had replaced it by
getLastKnownLocation . but it got crashed. can any one knows why is
this happening?
this is my code.
LocationManager myManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
Double latPoint = myManager.getLastKnownLocation("gps").getLatitude
();
Double lngPoint = myManager.getLastKnownLocation("gps").getLongitude
();
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
-~----------~----~----~----~------~----~------~--~---