Код: Выделить всё
`Geocoder gcd = new Geocoder(Context, Locale.getDefault());
List addresses = gcd.getFromLocation(
lastLocation.getLatitude(), lastLocation.getLongitude(), 1);
if(addresses.get(0).
getCountryName() !=null)
country =addresses.get(0).
getCountryName();
if(addresses.get(0).
getAdminArea() !=null)
state =addresses.get(0).
getAdminArea();
if(addresses.get(0).
getSubAdminArea() !=null)
{
city = addresses.get(0).getSubAdminArea();
} else if(addresses.get(0).
getLocality() !=null)
{
city = addresses.get(0).getLocality();
}`
Я уже проверял другие сообщения, но надежных не нашел.
Подробнее здесь: https://stackoverflow.com/questions/793 ... -state-par
Мобильная версия