While working with application that connects to a web service and sometime it wait too long if it can't get a connection. To avoid this too long waiting you can set connection timeout timing of the HTTP params as per you want.
If you want to do so you just have to apply this simple trick given below in you code :-
HttpClient client = new DefaultHttpClient();
HttpConnectionParams.setSoTimeout(client.getParams(), 15000);
HttpConnectionParams.setConnectionTimeout(client.getParams(),15000);
0 Comment(s)