Changw xcodes in cordova11/23/2023 ![]() See Advertising Data for more information. "id": "BD922605-1B07-4D55-8D09-B66653E51BBA",Īdvertising information format varies depending on your platform. To include the default set of permissions the plugin installs on Android SDK v31+, add the following snippet in your config.xml file, in the section:įor the best understanding about which permissions are needed for which combinations of target SDK version & OS version, see Android Bluetooth permissions API ![]() If you are having Android permissions conflicts with other plugins, try using the slim variant of the plugin instead with cordova plugin add This variant excludes all Android permissions, leaving it to the developer to ensure the right entries are added manually to the AndroidManifest.xml (see below for an example). For more information about background operation with this plugin, see Background Scanning and Notifications on iOS.ĪCCESS_BACKGROUND_LOCATION: Tells the plugin to request the ACCESS_BACKGROUND_LOCATION permission on Android 10 & Android 11 in order for scanning to function when the app is not visible. This is needed for background scanning support. ![]() This allows an application to warn the user before the Bluetooth access permission is requested.īLUETOOTH_RESTORE_STATE: Enable Bluetooth state restoration, allowing an app to be woken up to receive scan results and peripheral notifications. IOS_INIT_ON_LOAD: Prevents the Bluetooth plugin from being initialised until first access to the ble window object. This plugin generally best supports the following platforms and version ranges: cordovaĪll variables can be modified after installation by updating the values in package.json.īLUETOOTH_USAGE_DESCRIPTION: defines the values for NSBluetoothAlwaysUsageDescription. It's recommended to always use the latest cordova and cordova platform packages in order to ensure correct function. $ cordova plugin add cordova-plugin-ble-central -variable BLUETOOTH_USAGE_DESCRIPTION="Your description here" -variable IOS_INIT_ON_LOAD=true|false -variable BLUETOOTH_RESTORE_STATE=true|false -variable ACCESS_BACKGROUND_LOCATION=true|false (Optional) Add bluetooth-central to UIBackgroundModes to enable background receipt of scan information and BLE notifications.If this is not defined the app will crash. Set NSBluetoothAlwaysUsageDescription to a descriptive text, to be shown to the user on first access to the Bluetooth adapter.For more information about background operation with this plugin, see Background Scanning and Notifications on iOS.ĪccessBackgroundLocation: Tells the plugin to request the ACCESS_BACKGROUND_LOCATION permission on Android 10 & Android 11 in order for scanning to function when the app is not visible.Īfter installation, the following additions should be made to the app's ist Browser (where navigator.bluetooth is supported)īluetooth_restore_state: Enable Bluetooth state restoration, allowing an app to be woken up to receive scan results and peripheral notifications.Android (likely supports 6+, but 8.1 or greater recommended).See the examples for ideas on how this plugin can be used. If you want to create Bluetooth devices, try cordova-plugin-ble-peripheral. This plugin isn't intended for scanning beacons. Simultaneous connections to multiple peripherals are supported. Service, characteristic, and property info is returned when connecting to a peripheral.Īll access is via service and characteristic UUIDs. Get notified when characteristic's value changesĪdvertising information is returned when scanning for peripherals.The plugin provides a simple JavaScript API for iOS and Android. This plugin enables communication between a phone and Bluetooth Low Energy (BLE) peripherals. Bluetooth Low Energy (BLE) Central Plugin for Apache Cordova
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |