private boolean startPing(String ip){ Log.e("Ping", "startPing...");spa
boolean success=false;ip
Process p =null;get
try { it
p = Runtime.getRuntime().exec("ping -c 1 -i 0.2 -W 1 " +ip); io
int status = p.waitFor(); im
if (status == 0) { ping
success=true; time
} else { return
success=false; tar
}
} catch (IOException e) {
success=false;
} catch (InterruptedException e) {
success=false;
}finally{
p.destroy();
}
return success;
}