Tell me, please, how in android-e can be determined by the latitude and longitude of the address?

For example, I received a latitude of 55, and a longitude of 50, and from this data I want to receive an address of the form:

Moscow, Entuziastov highway, 33

    1 answer 1

    Try:

    Geocoder geocoder = new Geocoder(this, Locale.getDefault()); List<Address> addresses = geocoder.getFromLocation(latitude, longitude, 1); 
    • public class MyLocationListener implements LocationListener {public void onLocationChanged (Location loc) {Geocoder gc; loc.getLatitude (); loc.getLongitude (); Geocoder geocoder = new Geocoder (this, Locale.getDefault ()); List <Address> addresses = geocoder.getFromLocation (loc.getLatitude (), loc.getLongitude (), 1); String txt = "Current location:" + "\ nLatitud =" + loc.getLatitude () + "\ nLongitud =" + loc.getLongitude (); tv.setText (txt); } - Serjuk 4:03 pm
    • Why does it swear at Geocoder geocoder = new Geocoder (this, Locale.getDefault ()); - Serjuk 4:03 pm