Android “Only the original thread that created a view hierarchy can touch its views.”
You have to move the portion of the background task that updates the UI onto the main thread. There is a simple piece of code for this: runOnUiThread(new Runnable() { @Override public void run() { // Stuff that updates the UI } }); Documentation for Activity.runOnUiThread. Just nest this inside the method that is running … Read more