title: Webservice call from android device is not working,works well on emulator
body: <p>I have developed some android application project a few months ago,It includes,</p>
  
  <ul>
  <li>GCM functionality </li>
  <li>Webservice Calls</li>
  </ul>
  
  <p>It was working well at that time.Yesterday I tried to run it <strong>on a real device and I found that it was not able to make any webservice call</strong>.
  I was expecting the same on the emulator.But to my surprise it was <strong>working well on the emulator</strong>.....</p>
  
  <hr>
  
  <p>The exception I am getting on the real device is: <strong>ConnectionTimeOutException</strong>.</p>
  
  <hr>
  
  <p>I want to know that what went wrong to get rid of the issue.I am not sure what more information I should post.Please ask if you want me to post something</p>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>AsyncTask&lt;Void, Void, Boolean&gt; gettingHttpOTP = new AsyncTask&lt;Void, Void,Boolean&gt;(){
  HttpResponse httpresponse;
  HttpClient client ;
  JSONObject objSendjson;
  HttpPost post ;
  HttpEntity entity;
  String result;
  JSONObject objRetrievejson;
  
  @Override
  protected Boolean doInBackground(Void... arg0) {
  client = new DefaultHttpClient();
  
  HttpConnectionParams.setConnectionTimeout(client.getParams(), 50000);
  
  objSendjson = new JSONObject();
  
   try
   {
      post = new HttpPost(Configurations.API_VERIFY_END_USER);
  
  
      objSendjson.put("Mobile_Number", gCountryCodeAndMobileNumber);
      objSendjson.put("Signature_Key", Configurations.SIGNATUREKEY);
      post.setHeader("Content-type", "application/json");
      post.setEntity(new StringEntity(objSendjson.toString(), "UTF-8"));
      httpresponse = client.execute(post);
      entity = httpresponse.getEntity();
       gHttpResponseCode=httpresponse .getStatusLine().getStatusCode();
  
       if(gHttpResponseCode==200)
       {
      gResponseText = EntityUtils.toString(entity);
  
      objRetrievejson=new JSONObject(gResponseText);
  
      gRecievedJsonOutput=objRetrievejson.getString("Result_Output");
      gRecievedJsonDescription=objRetrievejson.getString("Result_Message");
      gRecievedJsonCode=objRetrievejson.getString("Result_Code");
      gRecievedJsonStatus=objRetrievejson.getString("Result_Status");
  
   }
       else
       {
           gResponseText=null;
       }
   }
   catch(Exception errorException)
   {
      Log.d("Exception generated with response code = "+gHttpResponseCode,""+ 
             errorException);
  
   }
   return null;
  }
  </code></pre>
  
  <hr>
  
  <h2>My web service is running on the internet and I tried using different ISP's</h2>
  
  <hr>
  
  <p><strong>Edit</strong>(4th May 2015):</p>
  
  <p>I don't know what caused the issue, but I haven't changed any code, but its working again.</p>