For some reason, when adding the uses-sdk fields in Android\'s manifest file causes crash. I\'ve not had this happen before but I can\'t get rid of it now.
The relevant
The error is NetworkOnMainThreadException
Starting with ICS, you cannot do any network access on main thread. You should probably use
AsyncTask
where you do network access.
As @Sameer said, you are doing network calls in the core of your Activity. You should NEVER do that. All the code of your activity run on the main thread : the one that is used for the UI. You should not make any heavy calculation on that thread : it takes resources away from the UI, making it lag. An http call is even worse : as long as you don't have the response the UI is blocked.
Implement your network calls in an AsyncTask.