Question

I'm using apache http client

import org.apache.http.impl.client.DefaultHttpClient;
//...
my_httpParams = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(my_httpParams, 300);
HttpConnectionParams.setSoTimeout(my_httpParams, 300);
httpclient = new DefaultHttpClient(my_httpParams);

for fetching name matching calling number from services like http://klicktel.de/ (reverse number lookup, using in Android Call Log for example). As you can see I set timeout to 300ms for both connection and socket timeout.

Do you have any hints what timeout should be set to be reasonable? I mean: user want to see the reversed-number but on the other hand user don't want to wait indefinitely for the number to be fetched.

Was it helpful?

Solution 2

I've found AndroidHttpClient which seems to answer my question:

Implementation of the Apache DefaultHttpClient that is configured with reasonable default settings and registered schemes for Android

OTHER TIPS

You can give any value I usually give 15 seconds.You can give any value

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top