How to get wifi standard

笑着哭i 提交于 2019-12-19 07:47:11

问题


How can I get and change wifi standard, which I'm using now in my android device. For example: IEEE 802.11b or IEEE 802.11g or IEEE 802.11n. If this is possible.


回答1:


Its not possible to get what type of network the phone is connected to. However you can find the speed of the network:

    WifiManager wifiManager = Context.getSystemService(Context.WIFI_SERVICE);
    WifiInfo wifiInfo = wifiManager.getConnectionInfo();
    if (wifiInfo != null) {
        Integer linkSpeed = wifiInfo.getLinkSpeed(); //measured using WifiInfo.LINK_SPEED_UNITS
    }

P.S.: You can probably guess the type of network by interrogating the encryption on the network. But there is no built in method.



来源:https://stackoverflow.com/questions/8624763/how-to-get-wifi-standard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!