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 only thing I can get now is the mobile operator name using:
using Microsoft.Phone.Net.NetworkInformation;
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("Mobile operator: ");
sb.AppendLine(DeviceNetworkInformation.CellularMobileOperator);
Like that I can get if WiFi is available, roaming available, just true or false. Is there any solution to get some of the other information, network type for example if it's GSM - CDMA for example?
Also looking for the wifi network list, spots available and get the list.
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);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With