From 7544932be9cce1e1041beae93f6b806004b84d0b Mon Sep 17 00:00:00 2001 From: Maxim Belov Date: Thu, 26 Sep 2024 07:32:26 +0300 Subject: [PATCH] Android: Move Android permissions to config.xml --- CHANGES.txt | 3 +++ README.md | 17 +++++++++++++++++ package.json | 2 +- plugin.xml | 11 +---------- www/bluetoothClassicSerial.js | 2 +- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ce06b1be..26a2c4af 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ += 0.9.15 = +Android: Move Android permissions to config.xml + = 0.9.14 = iOS: Add plugin variables diff --git a/README.md b/README.md index 93ea8974..a7350f2d 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,23 @@ All variables can be modified after installation by updating the values in `pack - `IOS_INIT_ON_LOAD`: [**iOS**] Prevents the Bluetooth plugin from being initialised until first access to the `bluetoothClassicSerial` window object. This allows an application to warn the user before the Bluetooth access permission is requested. +## Android permission + +To include the default set of permissions the plugin installs on Android SDK v33+, add the following snippet in your `config.xml` file, in the `` section: + +```xml + + + + + + + + +``` + +For the best understanding about which permissions are needed for which combinations of target SDK version & OS version, see [Android Bluetooth permissions](https://developer.android.com/guide/topics/connectivity/bluetooth/permissions) + ## Ionic $ npm i @awesome-cordova-plugins/bluetooth-classic-serial-port diff --git a/package.json b/package.json index f3527cd2..34a2d2a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-bluetooth-classic-serial-port", - "version": "0.9.14", + "version": "0.9.15", "description": "Cordova Bluetooth Serial Port Profile Communication Plugin", "cordova": { "id": "cordova-plugin-bluetooth-classic-serial-port", diff --git a/plugin.xml b/plugin.xml index 01869c99..453c6614 100644 --- a/plugin.xml +++ b/plugin.xml @@ -3,7 +3,7 @@ xmlns="http://www.phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-bluetooth-classic-serial-port" - version="0.9.14"> + version="0.9.15"> Bluetooth Classic Serial Bluetooth Serial Communication Plugin @@ -29,15 +29,6 @@ - - - - - - - - - diff --git a/www/bluetoothClassicSerial.js b/www/bluetoothClassicSerial.js index fdae5661..3af59825 100644 --- a/www/bluetoothClassicSerial.js +++ b/www/bluetoothClassicSerial.js @@ -1,7 +1,7 @@ /*global cordova*/ module.exports = { - version: '0.9.14', + version: '0.9.15', connect: function (deviceId, interfaceArray, success, failure) {