cordova-plugin-android-permissions
cordova-plugin-android-permissions copied to clipboard
BLUETOOTH_CONNECT + BLUETOOTH_SCAN missing for Android +10
BLUETOOTH_CONNECT: 'android.permission.BLUETOOTH_CONNECT',
BLUETOOTH_SCAN: 'android.permission.BLUETOOTH_SCAN',
Are missing in the android-permission package and should be added as soon as possible!
Should be solved by https://github.com/NeoLSN/cordova-plugin-android-permissions/pull/103 and https://github.com/NeoLSN/cordova-plugin-android-permissions/pull/110
When use variable: this.androidPermissions.PERMISSION.BLUETOOTH_SCAN response is undefined
Code:
`import { AndroidPermissions } from '@awesome-cordova-plugins/android-permissions/ngx';
constructor(private androidPermissions: AndroidPermissions){} `
Ionic version: 6.20.1 capacitor: 4
@rigstechnology: The error you're reporting is not from this Cordova plugin but from the Ionic TypeScript wrapper you're using, which as of now hasn't been updated for 11 months, so doesn't yet include the Bluetooth permissions that were recently added to this Cordova plugin.
Have submitted a PR for the Ionic project to add all of the missing Bluetooth permissions, along with some other permissions too. From looking at the PR list, I don't think that the Ionic TypeScript wrapper package is frequently maintained. Thus it may possibly be a while before you may see the NGX package accepting that permission. I'd therefore perhaps consider adding a // @ts-ignore comment just above the line that throws the error and see if that works for you. Basically telling TypeScript to ignore that the entry is not defined.
Here's a link to the PR: https://github.com/danielsogl/awesome-cordova-plugins/pull/4295
This is in a different project and isn't maintained by the same folks.
@rigstechnology FYI Ionic have merged in the changes to @awesome-cordova-plugins/android-permissions, so just updating your plugins will resolve the issue.