Code to find current Latitude and Longitude
Step 2 A from Solution 1
GPSTracker gpsTracker = new GPSTracker(this);
if (gpsTracker.canGetLocation()) {
String stringLatitude = String.valueOf(gpsTracker.latitude);
textview = (TextView) findViewById(R.id.fieldLatitude);
textview.setText("Latitude: " + stringLatitude);
String stringLongitude = String.valueOf(gpsTracker.longitude);
textview = (TextView) findViewById(R.id.fieldLongitude);
textview.setText("Longitude: " + stringLongitude);
String country = gpsTracker.getCountryName(this);
textview = (TextView) findViewById(R.id.fieldCountry);
textview.setText("Country: " + country);
String city = gpsTracker.getLocality(this);
textview = (TextView) findViewById(R.id.fieldCity);
textview.setText("City: " + city);
String postalCode = gpsTracker.getPostalCode(this);
textview = (TextView) findViewById(R.id.fieldPostalCode);
textview.setText("PostalCode: " + postalCode);
String addressLine = gpsTracker.getAddressLine(this);
textview = (TextView) findViewById(R.id.fieldAddressLine);
textview.setText("AddressLine: " + addressLine);
} else {
gpsTracker.showSettingsAlert();
}
Hope This Will Helps you.