I have an app where the user submits some data in a form which is then sent to a server. I am testing it on a tablet and an Android smartphone (Galaxy S2). On the tablet, as soo
You're trying to run a network request on the main UI thread. Android does not allow you to do that since 3.0 (I believe). Doing so causes your UI to lock up until the request is completed, rendering your app useless during the execution of the request.
You'll either have to run your request in a new Thread
or an ASyncTask
, to take the load of the UI thread. You can find more info on how to use multiple threads here.