title: How can I ping some website with parameters on Android? Auch as specifuing the packet size and the ping times?
body: <p>I foud some Stack Overflow questions such as <a href="https://stackoverflow.com/questions/14576710/ping-application-in-android">Ping Application in Android</a>. It uses it like this:</p>
  
  <pre><code>Process process = Runtime.getRuntime().exec(
              "/system/bin/ping -c 8 " + url);
  </code></pre>
  
  <p>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.</p>
  
  <p>When I modify to</p>
  
  <pre><code>Process process = Runtime.getRuntime().exec(
              "/system/bin/ping -c 8 -s 1472" + url);
  </code></pre>
  
  <p>it does not work. Why?</p>