I know and I did. But as I say, even if I increase the timeout (up to 1 
minute) I got the exact same issue.
Forget to mention that if I do the exact same request with the browser, it 
works as expected and almost instantly...

On Tuesday, November 6, 2012 3:12:09 PM UTC+1, RichardC wrote:
>
> On a mobile device you must always expect some timeouts due to the 
> unreliability of the connection.  So you must code for this.
>
> On Tuesday, November 6, 2012 10:22:16 AM UTC, Thomas Bouron wrote:
>>
>> Hello.
>>
>> I'm facing an issue that I cannot get a rid of it. Let me explain:
>> I use for my app the AndroidHttpClient to make connection to a REST 
>> server. Everything works as expected except for a few of my users. At some 
>> point, my code throws an SocketTimeoutException. So I search all over the 
>> web and I found that it seems to be related to the DNS lookup. The solution 
>> to counter part is to use HttpURLConnection.
>>
>> Now the funny part: On the emulator at home, everything is fine, 
>> impossible to reproduce the issue. But on the emulator at work (behind a 
>> transparent proxy) I got a really weird behavior. Sometimes it works, 
>> sometimes not. Event if I change the AndroidHttpClient 
>> to HttpURLConnection, I got the same result. Increasing the timeout doesn't 
>> solve the problem either, it just increase the time before reaching 
>> the SocketTimeoutException. Regarding to my research, i also tried to 
>> change the URL by the IP of the REST server but nothing changed.
>>
>> So now I got any idea left, that's why I'm posting here. Is anyone 
>> already caught that?
>>
>> Thanks in advance.
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to