cordova-plugin-bluetoothle icon indicating copy to clipboard operation
cordova-plugin-bluetoothle copied to clipboard

Android 12 Bluetooth Permissions

Open mosor opened this issue 4 years ago • 10 comments

This plugin should be updated to work with Android 12's new bluetooth permissions.

mosor avatar Nov 17 '21 22:11 mosor

Seems we have to continue this plugin ourselves - or change to Capacitor. Anyone have any experience with Capacitor and their BLE plugin? Or know of a more updated fork to this plugin?

JesperBalslev avatar Jan 24 '22 13:01 JesperBalslev

Unfortunately I don't have the time or devices to continue working on this plugin directly, but I'm open to reviewing and hopefully approving pull requests.

randdusing avatar Jan 24 '22 13:01 randdusing

Hey its ok @randdusing. You have done a great job with this plugin. Thanks.

JesperBalslev avatar Jan 24 '22 15:01 JesperBalslev

I have worked on adding the new runtime permissions, and it does correctly ask for and check for them, but there seems to be issues on Android’s side with pairing peripherals. In the call to connectGatt, there is something logged about not being able to resolve the random private address, which is supposed to be resolved by a key that’s shared during pairing. I’ve tried many different things to try and resolve this issue and there are other people who built custom ble devices that continue not to work with Android 12 phones.

mosor avatar Jan 24 '22 15:01 mosor

Hey @JesperBalslev and @randdusing, I wanted to give a positive update to this issue. I think updating the plugin to request and check for the new permissions is possible. The issue we had is fixable with a firmware change, so people may want to look at their firmware if they still have issues. I'm happy to help when I have free time since I know @randdusing is busy.

mosor avatar Mar 18 '22 15:03 mosor

@mosor could you please write a PR or send your patch to me? :) [email protected]

several customers can't scan for their clothing items right now xD

thank you in advance :) <3

Funkelfetisch avatar Mar 25 '22 23:03 Funkelfetisch

Hi.

I've made PR #730

Currently I'm using it in one project and it's working fine.

Cyb0org avatar Jul 28 '22 16:07 Cyb0org