Is there a way to retrieve the MAC of a wireless module in an Android device ?
On PC I was able to retrieve my MAC, but the same script on Android does not work.
Here’s how I’m using it on PC:
using UnityEngine;
using System.Collections;
using System.Net;
using System.Net.NetworkInformation;
public class MACBind : MonoBehaviour {
public string PhysicalAddress;
public void Start(){
DisplayTypeAndAddress();
}
public void DisplayTypeAndAddress()
{
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
PhysicalAddress = nics[0].GetPhysicalAddress().ToString();
Debug.Log("MAC: " + PhysicalAddress );
}