title: Android: host is not reachable
body: <p>I just run the below code as a normal java class file and status.isReachable(3000) returns true.</p>
  
  <pre><code>InetAddress status = InetAddress.getByName("android.com");
  
  status.isReachable(3000);
  </code></pre>
  
  <p>If i run the same code from the Android Project, <code>status.isReachable(3000)</code> always return false. Why is it returning false? Will it always returns false in the Emulator. I had also read this post
  [why-inetaddress-getbyname-isreachable-works-on-device-but-not-on-the-eclipse][1]</p>
  
  <p>What I have done so far:</p>
  
  <p>-kept the permission on the mainfest file</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;
   &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"&gt;&lt;/uses-permission&gt;
  </code></pre>
  
  <p>-disable my firewall.</p>
  
  <p>-ping the android.com from my PC, the host is reachable</p>
  
  <p>I was doing this to check whether the address in the preference is dead or alive</p>