Get the phone’s last known location using Android

the code below will return the lasted known location of the phone using the Android platform. Get Phone location in Android import android.location.LocationManager; public double[] getGPSLocation() { double[] LatLong = new double[2]; LocationManager _locationmanager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); List<String> _providers = _locationmanager .getProviders(true); Location _location = null; for (int i = _providers.size()-1; i>=0; i--) { _location... » read more