Android Ping ICMP edit

Performs a single Ping

This example attempts a single Ping request. The ping command inside the runtime.exec method call can be modified to any valid ping command you might perform yourself in the command line.

try {
    Process ipProcess = runtime.exec("/system/bin/ping -c 1 8.8.8.8");
    int exitValue = ipProcess.waitFor();
    ipProcess.destroy();
    
    if(exitValue == 0){
        // Success
    } else { 
        // Failure
    }
} catch (IOException | InterruptedException e) {
    e.printStackTrace();
}
Ping ICMP/
Ping ICMP
Performs a single Ping

Table Of Contents
39 ACRA
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
230 Ping ICMP
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close