我正在使用新方法is5GHzBandSupported(),它可以在WifiManager中使用,因为API级别为21。
http://developer.android.com/reference/android/net/wifi/WifiManager.html#is5GHzBandSupported%28%29
在我的Nexus 5上,它工作得很好(按预期返回是的),但是
有没有人在其他模型上见过这种行为,是这些模型非常具体的rom问题,还是对这种方法行为的误解?
发布于 2017-04-29 12:38:13
使用下面的代码片段来检测设备是否支持5 5Ghz波段。
WifiManager wifiManager= (WifiManager)mContext.getApplicationContext().getSystemService(WIFI_SERVICE);
Class cls = Class.forName("android.net.wifi.WifiManager");
Method method = cls.getMethod("isDualBandSupported");
Object invoke = method.invoke(wifiManager);
boolean is5GhzSupported=(boolean)invoke;https://stackoverflow.com/questions/31287989
复制相似问题