I am using multiple asynctask in my code to make multiple http requests , and I have to use the same client for them. But android is not allowing me to do so. It is asking me to close the connection first and then start a new one again.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
why?
Well, then do what it says. Basically it tells you clearly you are (ab)using httpclient which is not ready to do what you want it to. Luckily there are other httpclients available which you should use instead of builtin one. Or, depending on target sdk, use http://developer.android.com/reference/android/net/http/AndroidHttpClient.html