判断wifi是2.4G还是5G
1.WifiInfo 源码:
int mFrequency=wifiInfo.getFrequency();
/**
* @hide
* TODO: makes real freq boundaries
*/
public boolean is24GHz() {
return ScanResult.is24GHz(mFrequency);
} /**
* @hide
* TODO: makes real freq boundaries
*/
public boolean is5GHz() {
return ScanResult.is5GHz(mFrequency);
}
2. ScanResult 代码
public static boolean is24GHz(int freq) {
return freq > 2400 && freq < 2500;
}
/**
* @hide
* TODO: makes real freq boundaries
*/
public static boolean is5GHz(int freq) {
return freq > 4900 && freq < 5900;
}
判断wifi是2.4G还是5G的更多相关文章
- 2.4G和5G的Wi-Fi各自优缺点对比
原文地址:http://service.tp-link.com.cn/detail_article_3366.html 1.为什么5G信号的穿墙效果比2.4G信号差? 与路由器的距离相同时,5G信号相 ...
- 世界各个地区WIFI 2.4G及5G信道划分表(附无线通信频率分配表)
参考:https://blog.csdn.net/dxpqxb/article/details/80969760 目前主流的无线WIFI网络设备802.11a/b/g/n/ac: 传统 802.11 ...
- 转:Android 判断用户2G/3G/4G移动数据网络
Android 判断用户2G/3G/4G移动数据网络 在做 Android App 的时候,为了给用户省流量,为了不激起用户的愤怒,为了更好的用户体验,是需要根据用户当前网络情况来做一些调整的,也可以 ...
- Android 判断用户2G/3G/4G移动数据网络
Android 判断用户2G/3G/4G移动数据网络 在做 Android App 的时候,为了给用户省流量,为了不激起用户的愤怒,为了更好的用户体验,是需要根据用户当前网络情况来做一些调整的,也可以 ...
- 2.4G还是5G?带你选择最正确的路由器
智能设备井喷的时代,无线路由器成为家庭中最重要的电器设备.稳定性.连接速度.信号强弱都是无线路由使用体验的重要组成部分.究竟如何选购与配置路由器才能得到最好的用户体验呢? 当你在选购无线路由器的时候是 ...
- android 中判断WiFi是否可用的可靠方法 ,android 是否联网
http://alex-yang-xiansoftware-com.iteye.com/blog/619841 在一些程序中,需要从网上下载数据,或者通过其他方式对网络产生流量,当wifi不可用时应该 ...
- 判断wifi连接是否可用
/*** 判断当前连接方式是否是WIFI连接* * @param context* @return*/private static boolean isWifiConnected(Context co ...
- js 判断 wifi and 流量
var connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection || { ...
- Android 判断wifi和4G网络是否开启
public boolean isWifiAvailable() { ConnectivityManager connectivityManager = (ConnectivityManager) g ...
随机推荐
- 44.bucket filter:统计各品牌最近一个月的平均价格
课程大纲 GET /tvs/sales/_search { "size": 0, "query": { "term": { &quo ...
- PHP websocket之聊天室实现
PHP部分 <?php error_reporting(E_ALL); set_time_limit(0);// 设置超时时间为无限,防止超时 date_default_timezone_set ...
- proxy 跨域配置, 针对有axios的baseURL
1.首先主要的config文件下的index.js中的proxytable配置 proxyTable:{ '/proxy': { target:'http://192.168.2.141:8080', ...
- (蓝桥)2017C/C++A组第七题正则问题
#include<iostream> #include<memory.h> #include<stack> #include<string> using ...
- 洛谷 2234 BZOJ 1588 HNOI2002 营业额统计
[题解] treap模板题,直接用Treap维护前驱.后继,每次找到更接近当前val的加上就好了. #include<cstdio> #include<algorithm> # ...
- TypeError: CleanWebpackPlugin is not a constructor
在项目中引入clean-webpack-plugin打包后报错 new CleanWebpackPlugin(), ^ TypeError: CleanWebpackPlugin is not a c ...
- HDU - 1403 - Longest Common Substring
先上题目: Longest Common Substring Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/32768 K ...
- hdu_1038_Biker's Trip Odometer_201311021643
Biker's Trip Odometer Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Ot ...
- 猫猫学iOS之UILabel设置圆角不成功所做调控更改
原创文章.欢迎转载.转载请注明:翟乃玉的博客 地址:http://blog.csdn.net/u013357243 如图问题 如图是我要做的效果 然而当我写好代码后,设置号label的layer圆角后 ...
- volley基本使用方法
用volley訪问server数据,不用自己额外开线程.以下样例为訪问JSONObject类型的数据,详细使用方法看代码: 首先得有volley的jar包,假设自己没有.去github上下载,然后自己 ...