android Http connection timeout not working
<p>Time out not working and show this Exception <code>"Error in http connectionjava.net.UnknownHostException: mysite.com"</code></p>

<p>and this permission added in my manifest :
<code>android.permission.INTERNET</code></p>

<pre><code>        ArrayList nameValuePairs = new ArrayList();
        nameValuePairs.add(new BasicNameValuePair("q","select max(cat_id) from cat"));
        //http post
        UrlEncodedFormEntity form;
        try{
            form = new UrlEncodedFormEntity(nameValuePairs,"UTF-8");





            HttpParams httpParameters = new BasicHttpParams();
            HttpConnectionParams.setConnectionTimeout(httpParameters, 5000);
            HttpConnectionParams.setSoTimeout(httpParameters, 5000);

            DefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);


             String strURL=host+"/app/query.php";

             HttpPost httppost = new HttpPost(strURL);
             httppost.setEntity(form);
             BasicHttpResponse response = (BasicHttpResponse)  httpclient.execute(httppost);
             HttpEntity entity = response.getEntity();
             is = entity.getContent();
             }catch(Exception e){
                 Log.e("log_tag", "Error in http connection"+e.toString());
            }
</code></pre>

<p>any idea?</p>
