I foud some Stack Overflow questions such as Ping Application in Android. It uses it like this:
Process process = Runtime.getRuntime().exec(
"/system/bin/ping -c 8 " + url);
How can I specify the packet size and the ping times? For example, I want to ping 10 times, and specify the package length is 1472 bytes. How can I do that? Sample code is preferred.
When I modify to
Process process = Runtime.getRuntime().exec(
"/system/bin/ping -c 8 -s 1472" + url);
it does not work. Why?