Geocoder geocoder=new Geocoder(mcontext);
try {
//5为匹配该经纬度的五种地址结果(也可以自己设置返回的匹配数),貌似五种结果都是在说同一个地方,不过返回的数据不相同,打出Log可以比较一下
List<Address> list= geocoder.getFromLocation(mlocation.getLatitude(),mlocation.getLongitude(), 5);
for(int i=0;i<list.size();i++){
Log.d(TAG, "tostring:"+list.get(i).toString());
Log.d(TAG,"countryname:"+ list.get(i).getCountryName());
Log.d(TAG,"getAdminArea:"+ list.get(i).getAdminArea());
Log.d(TAG,"getFeatureName:"+ list.get(i).getFeatureName());
Log.d(TAG,"getLocality:"+ list.get(i).getLocality());
Log.d(TAG,"getLocale:"+ list.get(i).getLocale());
}
} catch (IOException e) {
e.printStackTrace();
}