Kris
0
Q:

xamarin get device mac address

    public static string GetDeviceMacAddress()
    {
        foreach (var netInterface in NetworkInterface.GetAllNetworkInterfaces()) 
        {
            if (netInterface.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 ||
                netInterface.NetworkInterfaceType == NetworkInterfaceType.Ethernet) 
            {
                var address = netInterface.GetPhysicalAddress();
                return BitConverter.ToString(address.GetAddressBytes());

            }
        }

        return "NoMac";
    }
0

New to Communities?

Join the community