Rakesh Gondaliya
Rakesh Gondaliya

Reputation: 1050

Android : Using GPS

Is there any way by which i can get the last GPS location my application itself ????

Is there any API available which can show me the Lat and Long. of the place from where i have connected GPS last time.

Any help, much appriciated

Thank you

Upvotes: 0

Views: 423

Answers (2)

Nikola Smiljanić
Nikola Smiljanić

Reputation: 26863

LocationManager manager = (LocationManager)Context.getSystemService(Context.LOCATION_SERVICE);
manager.getLastKnownLocation(LocationManager.GPS_PROVIDER);

Upvotes: 1

rakete
rakete

Reputation: 3051

You can use the LocationManager.

http://developer.android.com/reference/android/location/LocationManager.html

Upvotes: 1

Related Questions