I have created an Android application where I connect to a remote server php file to retrieve some information. Below is the code for that.
Here I want to add timeo
Use the HttpConnectionParams of your DefaultHttpClient::
HttpConnectionParams
DefaultHttpClient
final HttpParams httpParameters = yourHttpClient.getParams(); HttpConnectionParams.setConnectionTimeout(httpParameters, connectionTimeOutSec * 1000); HttpConnectionParams.setSoTimeout (httpParameters, socketTimeoutSec * 1000);