tags:

views:

51

answers:

2

Hi,

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

+1  A: 

You can use the LocationManager.

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

elr
+1  A: 
LocationManager manager = (LocationManager)Context.getSystemService(Context.LOCATION_SERVICE);
manager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
Nikola Smiljanić
@ Nikola Smiljanic: Thanks for ur reply.....
Rakesh Gondaliya
import android.content.Context;import android.location.LocationManager;LocationManager manager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);manager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
JP Hellemons