Reputation: 8800
My app was working fine till now until I put the following line in android manifest
<uses-sdk android:targetSdkVersion="14"/>
Now the app is not making HTTP request as far as i can tell b'coz the app is not logging in. Is there anything that I'm missing.
When I use
<uses-sdk android:targetSdkVersion="9"/> or <uses-sdk android:targetSdkVersion="7"/>
it works.
Upvotes: 0
Views: 252
Reputation: 8800
I solved this Issue. The problem was that the async task was never entering doInBackground()
. The prob was that I was using webServiceTask.execute();
but now I changed it to if
(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
webServiceTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,"");
else
webServiceTask.execute("");
It started working after this.
Upvotes: 0
Reputation: 19040
It sounds like you're making your HTTP calls from the UI thread, which is not recommended but will work with a targetVersion of 9, later versions enforce the requirement that HTTP requests be done from a thread other than the UI thread, so when you change the targetVersion to 14 this check now gets enforced. You'll need to update your app code to make HTTP calls from a different thread (checkout Loaders and/or AsyncTask to help with that)
Upvotes: 2