Is there a way to ping a host (standard Android or via NDK implementation), and get detailed info on the response? (time, ttl, lost packages, etc..) I was thinking of some open source app that has this feature but can't find any...
Thanks
Is there a way to ping a host (standard Android or via NDK implementation), and get detailed info on the response? (time, ttl, lost packages, etc..) I was thinking of some open source app that has this feature but can't find any...
Thanks
Afaik, sending ICMP ECHO requests needs root (i.e. the app that does it needs to be setuid) - and that's not currently possible in "stock" Android (hell, even the InetAddress#isReachable() method in Android is a joke that doesn't work according to spec).
A very basic example using /usr/bin/ping & Process - reading the ping results, using an AsyncTask:
I found a way to execute ping command without root.
Spawns a 'sh' process first, and then execute 'ping' in that shell, the code:
It works fine on my HTC device with CyanogenMod 7.1.0 (Android 2.3.7)