You need AsyncTask to do the networking transmission and receiving using appropriate Connection classes, and finally have it return the value to the main UI thread via onPostExecute(). I am really not sure what is the sticking point that prevents you proceeding normally.