android 判断是否真正连接到internet(通过检测网址,需要时间) if (InetAddress.getByName("www.xy.com").isReachable(timeout)) { } else { }