android 判断是否真正连接到internet(通过检测网址,需要时间)

if (InetAddress.getByName("www.xy.com").isReachable(timeout))
{    }
else
{    }

 

posted @ 2013-11-03 20:46  花开花落云卷云舒  阅读(253)  评论(0编辑  收藏  举报