I have an Android app that works fine with Android 2.x and 3.x, but it fails when run on Android 4.x.
The problem is in this section of code:
URL url
Try removing the setDoOutput call. Taken from this blog: a blog
Edit: This is needed when using a POST call.