Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: android 12 enable permissions call #941

Merged
merged 1 commit into from
Oct 18, 2022
Merged

fix: android 12 enable permissions call #941

merged 1 commit into from
Oct 18, 2022

Conversation

samvimes01
Copy link
Contributor

Possible fix for an issue #940

Calling a window.ble.enable method throws an exception.

The exception:
java.lang.SecurityException: Permission Denial: starting Intent { act=android.bluetooth.adapter.action.REQUEST_ENABLE cmp=com.android.settings/.bluetooth.RequestPermissionActivity } from ProcessRecord{83ef7f3 12239:org.[my appname]/u0a337} (pid=12239, uid=10337) requires android.permission.BLUETOOTH_CONNECT

Calling new android 12 scan and connect permissions in a bulk fixes the issue.

peitschie added a commit that referenced this pull request Oct 18, 2022
@peitschie peitschie merged commit 8a04ac3 into don:master Oct 18, 2022
@peitschie
Copy link
Collaborator

Thanks for this @samvimes01

I've tweaked it a bit, as it turns out we only need the BLUETOOTH_CONNECT privilege (ref), but other than this, y our fix was spot on!

@peitschie peitschie added this to the 1.5.X milestone Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants