danielsogl / awesome-cordova-plugins

Native features for mobile apps built with Cordova/PhoneGap and open web technologies. Complete with TypeScript support.
https://danielsogl.gitbook.io/awesome-cordova-plugins/
Other
2.37k stars 2.43k forks source link

Exception calling Diagnostic.requestBluetoothAuthorization method #4739

Closed SidiBecker closed 5 days ago

SidiBecker commented 2 months ago

I'm submitting a ...

Current behavior: Calling Diagnostic.requestBluetoothAuthorization(), the promise is rejecting with errorException occurred: Value null at 0 of type org.json.JSONObject$1 cannot be converted to JSONArray on Android platform.

Expected behavior: System asking for Bluetooth permission successfully

Steps to reproduce: Just call the Diagnostic.requestBluetoothAuthorization() on Android

Related code: https://github.com/dpa99c/cordova-diagnostic-plugin/commit/8f41fe7d7f3fa3f58c55d4c32ad02fcb19fa2b3a#diff-504fb4a76cceae499fd94d8dc5db6830c1893f7de73e3861a02af2edca11beecR237

Other information: Using the follow code, the plugin works:

 cordova.plugins.diagnostic.requestBluetoothAuthorization((s) => {
         //success behavior
      }, (e) => {
        //errorbehavior
      }, 
      [] //With permissions param
);

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Ionic:

   Ionic CLI                     : 7.0.1 (C:\Users\s275\AppData\Roaming\nvm\v16.20.0\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 7.0.12
   @angular-devkit/build-angular : 15.2.5
   @angular-devkit/schematics    : 15.2.5
   @angular/cli                  : 15.2.5
   @ionic/angular-toolkit        : 9.0.0

Cordova:

   Cordova CLI       : 10.0.0 (cordova-lib@10.1.0)
   Cordova Platforms : android 12.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 40 other plugins)

Utility:

   cordova-res : 0.15.4
   native-run  : 1.7.2

System:

   NodeJS : v16.20.0 (C:\Program Files\nodejs\node.exe)
   npm    : 8.19.4
   OS     : Windows 10
github-actions[bot] commented 1 week ago

There has been no recent activity and this issue has been marked inactive.