nisrulz / easydeviceinfo

:iphone: [Android Library] Get device information in a super easy way.
Apache License 2.0
1.77k stars 227 forks source link

Cannot get device Wifi MAC and Bluetooth MAC address #10

Closed nisrulz closed 8 years ago

nisrulz commented 8 years ago

The WifiInfo.getMacAddress() and the BluetoothAdapter.getAddress() methods return a constant value of 02:00:00:00:00:00.

nisrulz commented 8 years ago

From the Android 6.0 Changelog

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.To access the hardware identifiers of nearby external devices via Bluetooth and Wi-Fi scans, your app must now have the ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permissions.

nisrulz commented 8 years ago

Closing as fixed for now.