Try using this code, it worked on my TAB2.
public class CityAsyncTask extends AsyncTask<String , String,String>
{
@Override
protected String doInBackground(String... params) {
Geocoder geocoder = new Geocoder(LatLongActivity.this, Locale.getDefault());
try
{
List<Address> addresses = geocoder.getFromLocation(latitude, longitude, 1);
Log.e("Addresses","-->"+addresses);
result = addresses.get(0).toString();
}
catch (IOException e)
{
e.printStackTrace();
}
return result;
}
@Override
protected void onPostExecute(String result) {
// TODO Auto-generated method stub
super.onPostExecute(result);
AlertDialog.Builder alert = new AlertDialog.Builder(LatLongActivity.this);
alert.setTitle("ADDRESS");
alert.setMessage(result);
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener(){
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
dialog.dismiss();
}
});
alert.setCancelable(false);
alert.show();
}
}