how to icmp ping on android

前端 未结 4 963
执念已碎
执念已碎 2020-12-08 08:11

I need to do a icmp ping to a host from my android device. I need to measure the round trip time. I am proficient with android and java, just dont know what library to use.

4条回答
  •  暖寄归人
    2020-12-08 09:07

    You will probably want to use the isReachable - see more details in the Android doc. However, apparently some networks block ICMP. There is a post where you can read more about this issue here.

提交回复
热议问题