Hey,
So after looking around It seems the consensus is that by using publishProgress() would be the way to update the UI for longer calculations. I seem to haave implemented this incorrectly though, because when I run this code I get an ANR. Can you help me understand why?
Here is my code:
http://pastebin.com/zQNhkDJ9
Your problem is probably that your doInBackground function is just calling publishProgress. All of your work is being done in publishProgress, which runs on the UI thread, so you’ll still get an ANR that way. You need to do your heavy lifting inside doInBackground, and then once your processing is done you can update the UI thread.