problem to do ping with android
<p>I'm trying to write an application for android and I need to perform a ping to one IP address. 
I'm trying to do this with isReachable but it doesn't seem to work.
I have also tried to ping with a process but timesout even thought the IP address is definitely up.</p>

<pre><code>Process proc;
    try {
        //proc = runtime.exec("ping fr.yahoo.com -c 1");
        //proc = runtime.exec("ping -c 4 221.221.221.1");
        proc = runtime.exec("ping -c 4 221.221.221.2");

        proc.waitFor();
        int exit = proc.exitValue();
        if (exit == 0) { // normal exit
           Log.d("PRUEBA","SI LLEGA");

        } else { // abnormal exit, so decide that the server is not reachable
           Log.d("PRUEBA","nolllega");
</code></pre>

<p>Could you help me please?
Many thanks and sorry for my english!</p>
