Skip to main content
Known Participant
Jun 18, 2019 2:05 PM UTC
Question

How to get Mac Address on Android?

Hi!

In Android 6 >, is it possible?

I'm getting this result: 02:00:00:00:00:00

Thanks a lot.

This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

Known Participant
Jun 27, 2019 6:49 PM UTC

Hi!

Thanks, but even with the ANE, the mac return 02:00:00:00:00:00.

'-'

Translate
marchbold
Inspiring
Jun 28, 2019 11:50 AM UTC

Android stopped allowing access to the mac address in Android 6

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.

https://developer.android.com/about/versions/marshmallow/android-6.0-changes#behavior-hardware-id

You should use one of the OS provided identifiers instead of the mac address.

Translate
air native extensions // https://airnativeextensions.com
Inspiring
Jun 18, 2019 3:03 PM UTC

I believe that the only way, will be thru an ANE.

Should be a simple ANE with a single method, however you still need to build one.

Translate