Possible fix to your problem.

If you are running any version of android after 2.2, you can't do any heavy work in the UI thread, including HTTPRequest and the like.  I have moved all of your work to another thread using the AsyncTask class, and though I have not tested it, there shouldn't be any more errors.