How to get wifi standard

前端 未结 1 991
天命终不由人
天命终不由人 2021-01-13 01:35

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条回答
  • 2021-01-13 02:11

    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.

    0 讨论(0)
提交回复
热议问题