Use EntityUtils.toString(resEntity)
in the Toast to get the same text.
Also no need to call runOnUiThread
, doInBackground
must return something, not null
, and that something will be available onPostExecute
which already is made to run on the UI thread.