Discussion:
HttpURLConnection - getResponseCode() Hangs
Iroid
2009-10-08 22:32:38 UTC
Permalink
Hello Everyone,

I am trying one scenario as follows:
1. Make the phone to Airplane mode
2. Remove from the Airplane mode
3. Receive Intent of dataconnection availblity
4. Issue a HTTP request
5. Read response code and
6. Process the response.

This works fine for the first time.
When I repeat this scenario It hangs in step 5. on a call to
getResponseCode().

Is there any way to get out of this situation?

Thanks
Alex Tang
2009-10-12 05:41:59 UTC
Permalink
What do you mean "hangs in step 5"? NoResponseException or other
cases?
Post by Iroid
Hello Everyone,
1. Make the phone to Airplane mode
2. Remove from the Airplane mode
3. Receive Intent of dataconnection availblity
4. Issue a HTTP request
5. Read response code and
6. Process the response.
This works fine for the first time.
When I repeat this scenario  It hangs in step 5. on a call to
getResponseCode().
Is there any way to get out of this situation?
Thanks
Loading...