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的更多相关文章

  1. 2.4G和5G的Wi-Fi各自优缺点对比

    原文地址:http://service.tp-link.com.cn/detail_article_3366.html 1.为什么5G信号的穿墙效果比2.4G信号差? 与路由器的距离相同时,5G信号相 ...

  2. 世界各个地区WIFI 2.4G及5G信道划分表(附无线通信频率分配表)

    参考:https://blog.csdn.net/dxpqxb/article/details/80969760 目前主流的无线WIFI网络设备802.11a/b/g/n/ac: 传统 802.11 ...

  3. 转:Android 判断用户2G/3G/4G移动数据网络

    Android 判断用户2G/3G/4G移动数据网络 在做 Android App 的时候,为了给用户省流量,为了不激起用户的愤怒,为了更好的用户体验,是需要根据用户当前网络情况来做一些调整的,也可以 ...

  4. Android 判断用户2G/3G/4G移动数据网络

    Android 判断用户2G/3G/4G移动数据网络 在做 Android App 的时候,为了给用户省流量,为了不激起用户的愤怒,为了更好的用户体验,是需要根据用户当前网络情况来做一些调整的,也可以 ...

  5. 2.4G还是5G?带你选择最正确的路由器

    智能设备井喷的时代,无线路由器成为家庭中最重要的电器设备.稳定性.连接速度.信号强弱都是无线路由使用体验的重要组成部分.究竟如何选购与配置路由器才能得到最好的用户体验呢? 当你在选购无线路由器的时候是 ...

  6. android 中判断WiFi是否可用的可靠方法 ,android 是否联网

    http://alex-yang-xiansoftware-com.iteye.com/blog/619841 在一些程序中,需要从网上下载数据,或者通过其他方式对网络产生流量,当wifi不可用时应该 ...

  7. 判断wifi连接是否可用

    /*** 判断当前连接方式是否是WIFI连接* * @param context* @return*/private static boolean isWifiConnected(Context co ...

  8. js 判断 wifi and 流量

    var connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection || { ...

  9. Android 判断wifi和4G网络是否开启

    public boolean isWifiAvailable() { ConnectivityManager connectivityManager = (ConnectivityManager) g ...

随机推荐

  1. input chrome下输入之后背景变为黄色的解决办法

    之所以Input输入之后背景原因色变为可恶的黄色,是因为在chrome 下input加上了input:-webkit-autofill这个属性,里面写的就是这个问题出现的原因 代码就是:input:- ...

  2. PAT 1093. Count PAT's

    The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and ...

  3. datetime库 日期与时间

    datetime是一个关于时间的库,主要包含的类有: date    日期对象,常用的属性有year,month,day time 时间对象,hour,minute,second,毫秒 datetim ...

  4. springMVC+springJDBC+Msql注解模式

    最近基于Spring4.X以上的版本写了一个springMVC+springJDBC+Msql注解模式的一个项目,之中也遇到过很多问题 ,为了防止以后遇到同样问题现记录一下知识点以及详细配置. 首先我 ...

  5. 混合了RBAC和ACL的权限系统(二) -- 基于RBAC的系统权限

    http://fightplane.iteye.com/blog/1278464 1. 概念说明 A 系统级权限:从角色的角度出发,不特定于任何实际的资源的权限.比如“用户是否可以修改标题”这个权限, ...

  6. CF586D. Phillip and Trains

    /* CF586D. Phillip and Trains http://codeforces.com/problemset/problem/586/D 搜索 */ #include<cstdi ...

  7. PatentTips - Substitute virtualized-memory page tables

    BACKGROUND Many computer systems utilize virtualized memory for security, stability and/or other pur ...

  8. Spring MVC-控制器(Controller)-参数方法名称解析器(Parameter Method Name Resolver )示例(转载实践)

    以下内容翻译自:https://www.tutorialspoint.com/springmvc/springmvc_parametermethodnameresolver.htm 说明:示例基于Sp ...

  9. 计算cost--全表扫描

    以下教大家怎样手工算出oracle运行计划中的cost值. 成本的计算方式例如以下: Cost = (        #SRds * sreadtim +        #MRds * mreadti ...

  10. hdu 4941 Magical Forest (map容器)

    Magical Forest Time Limit: 24000/12000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Other ...