DefaultHttpClient Timeout

by Mr.No » Thu, 12 Mar 2009 17:58:03 GMT

Sponsored Links
how i can set the timeout for a DefaultHttpClient?
and which function i must override to handle the event?

rgds Mr.No

DefaultHttpClient Timeout

by dillirao malipeddi » Thu, 12 Mar 2009 18:05:18 GMT

 int connection_Timeout = 10000; // = 10 sec

HttpParams my_httpParams = new BasicHttpParams();
HttpConnectionParams.setSoTimeout(my_httpParams, connection_Timeout);
HttpClient httpclient = new DefaultHttpClient(my_httpParams);  //get http
client with given params

Dilli Rao. M


Sponsored Links

DefaultHttpClient Timeout

by Mr.No » Thu, 12 Mar 2009 21:24:53 GMT



Other Threads

1. DDMS GPS triggers exactly once

I'm having a problem where I am able to update the location in the
Android Emulator from the Eclipse DDMS exactly once per time an
activity is loaded, but no more.

I discovered the problem in my application where Activity2 (which
accesses the GPS) is started by Activity1 (which doesn't do anything
particularly interesting); when Activity2 is started, I can update the
GPS position using the Manual input in Location Controls in the DDMS
and everything works fine.  However, then I get a LogCat message
"TTFF: XXXX" where XXXX is an apparently random number, and then the
GPS will no longer update.  However, if I click the Back button in the
emulator to return to Activity1, and then use Activity1 to restart
Activity2, I can enter a new GPS location.  But, I can't enter a
second one; tries to do so result in no apparent action.  My
application works perfectly well on a real device with a real GPS

To test things further, I closed and reopened the emulator,
immediately closed my application (from Activity1, which doesn't do
anything besides load an XML layout and attach an onClick listener to
a button), and loaded Google Maps.  I observed the same behavior here;
I could send one position that Google Maps would respond to, but any
subsequent attempts to update position fail.  When I close Google Maps
and reopen it, I am able to send exactly one more location update from

The distance between my subsequent location updates is usually 0.02
degrees, but I have tried it with up to 5 degrees also.  My
application does not use ACCESS_MOCK_LOCATION because I want to switch
back and forth between testing on a physical device and testing on the
emulator without having to update the manifest for each build, plus it
seems like setting a permission for my application shouldn't have
anything to do with Google Maps on the emulator.

Any ideas?  I would try loading up a GPX path, but the DDMS seems
broken there too:

2. Can I use android.provider.Telephony?

Hi everyone:
I have one problem when developing a sms application. I saw most
example code used the android.provider.Telephony package, but
that only exist in Android open source project, not in standard SDK.
Most people say : that means you should not use it in your
application. As you know, there is one application(
runs in emulator and work well, I read its source and it did use some
package just like I mentioned before( only exist in open source
project), e.g. android.provider.Telephony.Mms. That really puzzled me.
Anyone can help me? Thank you.

3. How are SMS and MMS save on android phone

4. Release screen on wake lock problem

5. Will beginTransaction() decease file reading times?

6. scrollbarSize problem

7. Help on configuring the Video display