How to get Mac Address?



I use the Uid for get the mac address but always return ‘uid.MAC: 02:00:00:00:00:00’

In my constructor i have:

constructor(private uid: Uid) {

       console.log("uid.MAC: ", uid.MAC);

in app.component i have:

       .then(result => {
         if(!result.hasPermission) {

What am i doing wrong?


It seems like it’s no longer possible to get the real MAC address this way.

Access to Hardware Identifier
To provide users with greater data protection, starting in this release, Android removes programmatic access to the device’s local hardware identifier for apps using the Wi-Fi and Bluetooth APIs. The WifiInfo.getMacAddress() and the BluetoothAdapter.getAddress() methods now return a constant value of 02:00:00:00:00:00.