cordova-plugin-bluetoothle
cordova-plugin-bluetoothle copied to clipboard
How can I have the right Mac address on getAdapterInfo method? Always returning "02:00:00:00:00:00"
After install the plugin I tried to get the mac address of my current device by executing: bluetoothle.getAdapterInfo(function(ren){console.log(ren);},function(ren){console.log(ren);});
and I received as a response at all devices: address: "02:00:00:00:00:00" isDiscoverable: false isEnabled: true isInitialized: true isScanning: false name: "Galaxy Tab A (2017)"
I just install the plugin... Am I missing something to get the right address?
Thx in advance!
Best, Elysio
Android removed the ability to obtain the device MAC address in Marshmallow or above. https://developer.android.com/about/versions/marshmallow/android-6.0-changes#behavior-hardware-id The plugin will need to be modified to account for these changes as it now requires more "user comprehensible" permission requests.
Since the MAC address can be used to uniquely identify a user for tracking purposes the required permission prompts the user that the app will require the exact location of the device
What type of modifications to the plugin are you expecting? There's already support for requesting finer grained location permissions.
I'm facing the same issue and as a result my device isn't discoverable. Any progress?
@randdusing Hello, has this problem been solved? Android 6.0 can't get the real MAC address
@elysiopires Has your problem been solved?
No! After android 6 they implemented security policies that prevent you to access this information.
Best, Elysio
On Tue, Mar 24, 2020 at 7:20 PM MrLrx [email protected] wrote:
@elysiopires https://github.com/elysiopires Has your problem been solved?
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/randdusing/cordova-plugin-bluetoothle/issues/504#issuecomment-603602774, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA76ZADKIQLXFTQL5ORWLDDRJFS6HANCNFSM4FZCNZCQ .