判断网络是否可用
来源:互联网 发布:windows可上网镜像 编辑:程序博客网 时间:2024/05/18 01:07
/** * 判断网络是否可用 */public static boolean NetIsOk(Activity act) {ConnectivityManager manager = (ConnectivityManager) act.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);if (manager == null) {return false;}NetworkInfo networkinfo = manager.getActiveNetworkInfo();if (networkinfo == null || !networkinfo.isAvailable()) {return false;}return true;}
0 0
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断网络是否可用
- 判断是否有可用网络
- 判断数据网络是否可用
- android 判断网络是否可用
- 判断当前网络是否可用
- Android判断网络是否可用
- Android 判断网络是否可用
- 自动更新工具类
- Tomcat--系统架构与设计模式,第 1 部分: 工作原理
- Spring常用属性的注入及属性编辑器
- Java初涉之6--浅谈反射
- 十二月英语学习总结-希冀
- 判断网络是否可用
- LeetCode 257:Binary Tree Paths
- 报错: org.apache.commons.pool2.impl.GenericObjectPoolConfig not found
- java网络协议(IPV4/IPV6)
- Masonry介绍与使用实践:快速上手Autolayout
- 扩展方法
- 判断浏览器版本并进行响应
- JAVA解析html标签
- iOS push