cordova-plugin-android-permissions icon indicating copy to clipboard operation
cordova-plugin-android-permissions copied to clipboard

BLUETOOTH_CONNECT + BLUETOOTH_SCAN missing for Android +10

Open FractalMind opened this issue 3 years ago • 4 comments

  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!

FractalMind avatar Jul 09 '22 01:07 FractalMind

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

hug0b avatar Jul 27 '22 15:07 hug0b

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 avatar Aug 15 '22 14:08 rigstechnology

@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.

NeilCresswell avatar Sep 03 '22 19:09 NeilCresswell

@rigstechnology FYI Ionic have merged in the changes to @awesome-cordova-plugins/android-permissions, so just updating your plugins will resolve the issue.

NeilCresswell avatar Sep 06 '22 06:09 NeilCresswell