How to Get City Name by Latitude &Longitude in android?

Use This:

 Geocoder geocoder = new Geocoder(this, Locale.getDefault());
 List<Address> addresses = geocoder.getFromLocation(MyLat, MyLong, 1);
 String cityName = addresses.get(0).getAddressLine(0);
 String stateName = addresses.get(0).getAddressLine(1);
 String countryName = addresses.get(0).getAddressLine(2);

For more in detailed google map example you check the links below:
http://www.demoadda.com/demo/android/load-googlemap_107

And for the background location updates:
http://www.demoadda.com/demo/android/download-android-background-location-update-service-demo_21

Leave a Comment