This line
textView.setText("bandwidth = " + bandwidth);
is giving you trouble. You are trying to update the UI
on a background Thread
. You need to either make it an AsyncTask
and update the UI
in a method other than doInBackground()
or use runOnUiThread()