Geocoder g = new Geocoder(this, Locale.getDefault());
java.util.List<android.location.Address> result = null;
// testing
try{
result = g.getFromLocation(43.324722,21.903333, 1);
if (result.size() > 0) {
selectedCity = result.get(0).getLocality();
}else
//no city found
}catch(Exception ex)
{
}
i am using above code to get city value in android but it always show no city found any one guide me what could be the problem?
I am using this function for getting all the information related to latitude and longitude just pass the latitude and longitude in this function then you find your answer.
I hope this is very help full to you.