title: how to simulate a real mobile internet connection within android emulator
body: <p>I'd like to know if there is some method to let emulator behave like real device when accessing internet. Before any operation that requires internet access I usually check connection like this</p>
  
  <pre><code>public boolean internet(){
              ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
              NetworkInfo netInfo = cm.getActiveNetworkInfo();
              if (netInfo != null &amp;&amp; netInfo.isConnectedOrConnecting()) {
                  return true;
              }
              return false;
      }
  </code></pre>
  
  <p>but on real device and when mobile reception is poor, internet connection isn't actually available thought internet() returned true. It's not just a latency issue or a low speed problem, the request it's not sent at all (or never get the response, I don't know). Currently I'm getting this problem when calling</p>
  
  <pre><code>HttpGet request = new HttpGet(new URI(url));
  HttpResponse response = httpclient.execute(request);
  </code></pre>
  
  <p>and have no idea how to debug it on a real device. I'm pretty sure it is mobile internet connection's fault, because I have no problem when the same device is connected via wi-fi.
  I thought that setting httpclient socket and connection timeouts would solve the problem, but I still get crashes.</p>