Windows Phone 8 network information

后端 未结 1 1056
走了就别回头了
走了就别回头了 2021-01-05 02:30

I am trying to get some information about the network like Network type, Network status, Cell ID, MCC, MNC, LAC, BID, NID, SID, Signal strength, Operator name.

The o

相关标签:
1条回答
  • 2021-01-05 03:12

    You can only get information for the currently connected network interfaces, not any other hotspots or cellular towers or their signal strength. You can't force the phone to change the connections either.

    You can tell if you're on GSM or CDMA or WiFi and at what speed you're connected, and whether you're roaming.

    See this page on MSDN, and specifically this linked page for a walk-through of the available APIs.

    You can get the Network type (GSM/CDMA/WiFi) from Microsoft.Phone.Net.NetworkInformation.NetworkType (see here).

    The code snippet to get the NetworkInformation objects is:

    private void UpdateNetworkInterfaces()
    {
        NetworkInterfaces.Clear();
        NetworkInterfaceList networkInterfaceList = new NetworkInterfaceList();
        foreach (NetworkInterfaceInfo networkInterfaceInfo in networkInterfaceList)
        {
            NetworkInterfaces.Add(networkInterfaceInfo.InterfaceName);
        }
    }
    
    0 讨论(0)
提交回复
热议问题