{"_id":"@commonheratige/bluetooth-le","name":"@commonheratige/bluetooth-le","dist-tags":{"latest":"7.0.0"},"versions":{"7.0.0":{"name":"@commonheratige/bluetooth-le","version":"7.0.0","description":"Capacitor plugin for Bluetooth Low Energy ","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"set -o pipefail && cd ios && pod install && xcodebuild clean build test -workspace Plugin.xcworkspace -scheme Plugin -destination \"platform=iOS Simulator,name=iPhone 16\" | xcpretty && cd ..","verify:android":"cd android && ./gradlew clean build test && cd ..","verify:web":"npm run test:coverage && npm run build","lint":"npm run eslint && npm run prettier -- --check && npm run lint:ios","lint:ios":"npm run swiftlint -- lint ios","lint:android":"cd android && ./gradlew clean lint && cd ..","fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- lint --fix --format ios","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js}\"","swiftlint":"node-swiftlint","docgen":"docgen --api BleClientInterface --output-readme README.md --output-json dist/docs.json","postdocgen":"prettier README.md --write","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","prepublishOnly":"npm run build","test":"jest","test:coverage":"jest --coverage","test:watch":"jest --watch","version:dev":"npm version --no-git-tag-version $(git describe)","release":"standard-version","release:minor":"standard-version -r minor","release:major":"standard-version -r major"},"author":{"name":"pwespi"},"license":"MIT","dependencies":{"@types/web-bluetooth":"^0.0.20"},"devDependencies":{"@capacitor/android":"^7.0.0","@capacitor/cli":"^7.0.0","@capacitor/core":"^7.0.0","@capacitor/docgen":"0.3.0","@capacitor/ios":"^7.0.0","@ionic/eslint-config":"^0.4.0","@ionic/prettier-config":"^4.0.0","@ionic/swiftlint-config":"^2.0.0","@types/jest":"^29.2.5","eslint":"^8.57.0","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","prettier":"^3.4.2","rimraf":"^6.0.1","rollup":"^4.30.1","standard-version":"^9.5.0","swiftlint":"^2.0.0","ts-jest":"^29.0.3","typescript":"~4.9.4"},"peerDependencies":{"@capacitor/core":">=7.0.0"},"keywords":["capacitor","plugin","native","bluetooth"],"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"prettier":"@ionic/prettier-config","swiftlint":"@ionic/swiftlint-config","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"repository":{"type":"git","url":"git+https://github.com/capacitor-community/bluetooth-le.git"},"bugs":{"url":"https://github.com/capacitor-community/bluetooth-le/issues"},"volta":{"node":"22.13.1","npm":"11.0.0"},"gitHead":"c07d1429dd99f2a1bcc38d1ad23ee9c78a9e5b18","homepage":"https://github.com/capacitor-community/bluetooth-le#readme","_id":"@commonheratige/bluetooth-le@7.0.0","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-iMIprsjZO/zecSPmAvxVFQh7HEa3qSpP+IGd2/B3HohMDG0ci3YQHlU8qVpkJes9NkZEzWcu220DTuauGLvPMg==","shasum":"8e4f7e3d9f7cd0d7d469af9a8e7f0c019d86396c","tarball":"https://registry.npmjs.org/@commonheratige/bluetooth-le/-/bluetooth-le-7.0.0.tgz","fileCount":55,"unpackedSize":645153,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCr/3LfWgxWbedYjSyAV4FdmucoNeh5NUBkF7q2MBl9NgIgHboAgDALrU32RDQzJzHMnC2CneOI9yhtYir9kWUFJPo="}]},"_npmUser":{"name":"commonheratige","email":"tkl.development@gmail.com"},"directories":{},"maintainers":[{"name":"commonheratige","email":"tkl.development@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bluetooth-le_7.0.0_1739303037343_0.41573153288415043"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-11T19:43:57.269Z","7.0.0":"2025-02-11T19:43:57.564Z","modified":"2025-02-11T19:43:57.836Z"},"maintainers":[{"name":"commonheratige","email":"tkl.development@gmail.com"}],"description":"Capacitor plugin for Bluetooth Low Energy ","homepage":"https://github.com/capacitor-community/bluetooth-le#readme","keywords":["capacitor","plugin","native","bluetooth"],"repository":{"type":"git","url":"git+https://github.com/capacitor-community/bluetooth-le.git"},"author":{"name":"pwespi"},"bugs":{"url":"https://github.com/capacitor-community/bluetooth-le/issues"},"license":"MIT","readme":"<p align=\"center\"><br><img src=\"https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png\" width=\"128\" height=\"128\" /></p>\n<h3 align=\"center\">Bluetooth Low Energy</h3>\n<p align=\"center\"><strong><code>@capacitor-community/bluetooth-le</code></strong></p>\n<p align=\"center\">\n  Capacitor plugin for Bluetooth Low Energy \n</p>\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/maintenance/yes/2025?style=flat-square\" />\n  <a href=\"https://github.com/capacitor-community/bluetooth-le/actions?query=workflow%3A%22CI%22\"><img src=\"https://img.shields.io/github/actions/workflow/status/capacitor-community/bluetooth-le/main.yml?branch=main&style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/@capacitor-community/bluetooth-le\"><img src=\"https://img.shields.io/npm/l/@capacitor-community/bluetooth-le?style=flat-square\" /></a>\n<br>\n  <a href=\"https://www.npmjs.com/package/@capacitor-community/bluetooth-le\"><img src=\"https://img.shields.io/npm/dw/@capacitor-community/bluetooth-le?style=flat-square\" /></a>\n  <a href=\"https://www.npmjs.com/package/@capacitor-community/bluetooth-le\"><img src=\"https://img.shields.io/npm/v/@capacitor-community/bluetooth-le?style=flat-square\" /></a>\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n<a href=\"#contributors-\"><img src=\"https://img.shields.io/badge/all%20contributors-20-orange?style=flat-square\" /></a>\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n</p>\n\n## Maintainers\n\n| Maintainer     | GitHub                                    |\n| -------------- | ----------------------------------------- |\n| Patrick Wespi  | [pwespi](https://github.com/pwespi)       |\n| Philip Peitsch | [peitschie](https://github.com/peitschie) |\n\n## Versions\n\n| Plugin | Capacitor | Documentation                                                                     |\n| ------ | --------- | --------------------------------------------------------------------------------- |\n| 7.x    | 7.x       | [README](https://github.com/capacitor-community/bluetooth-le/blob/main/README.md) |\n| 6.x    | 6.x       | [README](https://github.com/capacitor-community/bluetooth-le/blob/6.x/README.md)  |\n| 3.x    | 5.x       | [README](https://github.com/capacitor-community/bluetooth-le/blob/3.x/README.md)  |\n| 2.x    | 4.x       | [README](https://github.com/capacitor-community/bluetooth-le/blob/2.x/README.md)  |\n| 1.x    | 3.x       | [README](https://github.com/capacitor-community/bluetooth-le/blob/1.x/README.md)  |\n| 0.x    | 2.x       | [README](https://github.com/capacitor-community/bluetooth-le/blob/0.x/README.md)  |\n\n## Introduction\n\nThis is a Capacitor plugin for Bluetooth Low Energy. It supports the web, Android and iOS.\n\nThe goal is to support the same features on all platforms. Therefore the [Web Bluetooth API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API) is taken as a guidline for what features to implement.\n\nThis plugin only supports Bluetooth **Low Energy**, not Bluetooth serial / classic.\n\nFurthermore the plugin only supports the central role of the Bluetooth Low Energy protocol. If you need the peripheral role, take a look a these plugins:\n\n- https://github.com/randdusing/cordova-plugin-bluetoothle\n- https://github.com/don/cordova-plugin-ble-peripheral\n\nFor support of Web Bluetooth in various browsers, see [implementation status](https://github.com/WebBluetoothCG/web-bluetooth/blob/main/implementation-status.md).\n\nBelow is an index of all the methods available.\n\n<docgen-index>\n\n- [`initialize(...)`](#initialize)\n- [`isEnabled()`](#isenabled)\n- [`requestEnable()`](#requestenable)\n- [`enable()`](#enable)\n- [`disable()`](#disable)\n- [`startEnabledNotifications(...)`](#startenablednotifications)\n- [`stopEnabledNotifications()`](#stopenablednotifications)\n- [`isLocationEnabled()`](#islocationenabled)\n- [`openLocationSettings()`](#openlocationsettings)\n- [`openBluetoothSettings()`](#openbluetoothsettings)\n- [`openAppSettings()`](#openappsettings)\n- [`setDisplayStrings(...)`](#setdisplaystrings)\n- [`requestDevice(...)`](#requestdevice)\n- [`requestLEScan(...)`](#requestlescan)\n- [`stopLEScan()`](#stoplescan)\n- [`getDevices(...)`](#getdevices)\n- [`getBondedDevices()`](#getbondeddevices)\n- [`getConnectedDevices(...)`](#getconnecteddevices)\n- [`connect(...)`](#connect)\n- [`createBond(...)`](#createbond)\n- [`isBonded(...)`](#isbonded)\n- [`disconnect(...)`](#disconnect)\n- [`getServices(...)`](#getservices)\n- [`discoverServices(...)`](#discoverservices)\n- [`getMtu(...)`](#getmtu)\n- [`requestConnectionPriority(...)`](#requestconnectionpriority)\n- [`readRssi(...)`](#readrssi)\n- [`read(...)`](#read)\n- [`write(...)`](#write)\n- [`writeWithoutResponse(...)`](#writewithoutresponse)\n- [`readDescriptor(...)`](#readdescriptor)\n- [`writeDescriptor(...)`](#writedescriptor)\n- [`startNotifications(...)`](#startnotifications)\n- [`stopNotifications(...)`](#stopnotifications)\n- [Interfaces](#interfaces)\n- [Enums](#enums)\n\n</docgen-index>\n\nSee [Platform Support](#platform-support) for an overview of supported methods on Android, iOS and web.\n\n## Installation\n\n```\nnpm install @capacitor-community/bluetooth-le\nnpx cap sync\n```\n\n### iOS\n\nOn iOS, add the `NSBluetoothAlwaysUsageDescription` to `Info.plist`, otherwise the app will crash when trying to use Bluetooth (see [here](https://developer.apple.com/documentation/corebluetooth)).\n\nIf the app needs to use Bluetooth while it is in the background, you also have to add `bluetooth-central` to `UIBackgroundModes` (for details see [here](https://developer.apple.com/documentation/bundleresources/information_property_list/uibackgroundmodes)).\n\n`./ios/App/App/Info.plist`:\n\n```diff\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n  ...\n+\t<key>NSBluetoothAlwaysUsageDescription</key>\n+\t<string>Uses Bluetooth to connect and interact with peripheral BLE devices.</string>\n+\t<key>UIBackgroundModes</key>\n+\t<array>\n+\t\t<string>bluetooth-central</string>\n+\t</array>\n</dict>\n</plist>\n\n```\n\n**Note**: Bluetooth is **not** available in the iOS simulator. The `initialize` call will be rejected with an error \"BLE unsupported\". You have to test your app on a real device.\n\n### Android\n\nOn Android, no further steps are required to use the plugin.\n\n#### (Optional) Android 12 Bluetooth permissions\n\nIf your app targets Android 12 (API level 31) or higher and your app doesn't use Bluetooth scan results to derive physical location information, you can strongly assert that your app doesn't derive physical location. This allows the app to scan for Bluetooth devices without asking for location permissions. See the [Android documentation](https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#declare-android12-or-higher).\n\nThe following steps are required to scan for Bluetooth devices without location permission on Android 12 devices:\n\n- In `android/variables.gradle`, make sure `compileSdkVersion` and `targetSdkVersion` are at least 31 (changing those values can have other consequences on your app, so make sure you know what you're doing).\n- In `android/app/src/main/AndroidManifest.xml`, update the permissions:\n  ```diff\n      <!-- Permissions -->\n  +   <uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" android:maxSdkVersion=\"30\" />\n  +   <uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" android:maxSdkVersion=\"30\" />\n  +   <uses-permission android:name=\"android.permission.BLUETOOTH_SCAN\"\n  +     android:usesPermissionFlags=\"neverForLocation\"\n  +     tools:targetApi=\"s\" />\n  ```\n- Set the `androidNeverForLocation` flag to `true` when initializing the `BleClient`.\n  ```ts\n  import { BleClient } from '@capacitor-community/bluetooth-le';\n  await BleClient.initialize({ androidNeverForLocation: true });\n  ```\n\n> [_Note_: If you include neverForLocation in your android:usesPermissionFlags, some BLE beacons are filtered from the scan results.](https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#assert-never-for-location)\n\n## Configuration\n\nYou can configure the strings that are displayed in the device selection dialog on iOS and Android when using `requestDevice()`:\n\n`./capacitor.config.json`:\n\n```JSON\n{\n  \"...\": \"other configuration\",\n  \"plugins\": {\n    \"BluetoothLe\": {\n      \"displayStrings\": {\n        \"scanning\": \"Am Scannen...\",\n        \"cancel\": \"Abbrechen\",\n        \"availableDevices\": \"Verfügbare Geräte\",\n        \"noDeviceFound\": \"Kein Gerät gefunden\"\n      }\n    }\n  }\n}\n```\n\nThe default values are:\n\n```JSON\n{\n  \"plugins\": {\n    \"BluetoothLe\": {\n      \"displayStrings\": {\n        \"scanning\": \"Scanning...\",\n        \"cancel\": \"Cancel\",\n        \"availableDevices\": \"Available devices\",\n        \"noDeviceFound\": \"No device found\"\n      }\n    }\n  }\n}\n```\n\nThe display strings can also be set at run-time using [`setDisplayStrings(...)`](#setdisplaystrings).\n\n## Usage\n\nThere is a plugin wrapper class `BleClient` which makes events and method arguments easier to work with.\n\n```typescript\n// Import the wrapper class\nimport { BleClient } from '@capacitor-community/bluetooth-le';\n```\n\n**Note**: It is not recommended to use the `BluetoothLe` plugin class directly.\n\n### Heart rate monitor\n\nHere is an example of how to use the plugin. It shows how to read the heart rate from a BLE heart rate monitor such as the Polar H10.\n\n```typescript\nimport { BleClient, numbersToDataView, numberToUUID } from '@capacitor-community/bluetooth-le';\n\nconst HEART_RATE_SERVICE = '0000180d-0000-1000-8000-00805f9b34fb';\nconst HEART_RATE_MEASUREMENT_CHARACTERISTIC = '00002a37-0000-1000-8000-00805f9b34fb';\nconst BODY_SENSOR_LOCATION_CHARACTERISTIC = '00002a38-0000-1000-8000-00805f9b34fb';\nconst BATTERY_SERVICE = numberToUUID(0x180f);\nconst BATTERY_CHARACTERISTIC = numberToUUID(0x2a19);\nconst POLAR_PMD_SERVICE = 'fb005c80-02e7-f387-1cad-8acd2d8df0c8';\nconst POLAR_PMD_CONTROL_POINT = 'fb005c81-02e7-f387-1cad-8acd2d8df0c8';\n\nexport async function main(): Promise<void> {\n  try {\n    await BleClient.initialize();\n\n    const device = await BleClient.requestDevice({\n      services: [HEART_RATE_SERVICE],\n      optionalServices: [BATTERY_SERVICE, POLAR_PMD_SERVICE],\n    });\n\n    // connect to device, the onDisconnect callback is optional\n    await BleClient.connect(device.deviceId, (deviceId) => onDisconnect(deviceId));\n    console.log('connected to device', device);\n\n    const result = await BleClient.read(device.deviceId, HEART_RATE_SERVICE, BODY_SENSOR_LOCATION_CHARACTERISTIC);\n    console.log('body sensor location', result.getUint8(0));\n\n    const battery = await BleClient.read(device.deviceId, BATTERY_SERVICE, BATTERY_CHARACTERISTIC);\n    console.log('battery level', battery.getUint8(0));\n\n    await BleClient.write(device.deviceId, POLAR_PMD_SERVICE, POLAR_PMD_CONTROL_POINT, numbersToDataView([1, 0]));\n    console.log('written [1, 0] to control point');\n\n    await BleClient.startNotifications(\n      device.deviceId,\n      HEART_RATE_SERVICE,\n      HEART_RATE_MEASUREMENT_CHARACTERISTIC,\n      (value) => {\n        console.log('current heart rate', parseHeartRate(value));\n      },\n    );\n\n    // disconnect after 10 sec\n    setTimeout(async () => {\n      await BleClient.stopNotifications(device.deviceId, HEART_RATE_SERVICE, HEART_RATE_MEASUREMENT_CHARACTERISTIC);\n      await BleClient.disconnect(device.deviceId);\n      console.log('disconnected from device', device);\n    }, 10000);\n  } catch (error) {\n    console.error(error);\n  }\n}\n\nfunction onDisconnect(deviceId: string): void {\n  console.log(`device ${deviceId} disconnected`);\n}\n\nfunction parseHeartRate(value: DataView): number {\n  const flags = value.getUint8(0);\n  const rate16Bits = flags & 0x1;\n  let heartRate: number;\n  if (rate16Bits > 0) {\n    heartRate = value.getUint16(1, true);\n  } else {\n    heartRate = value.getUint8(1);\n  }\n  return heartRate;\n}\n```\n\n### Scanning API\n\nHere is an example of using the scanning API.\n\n```typescript\nimport { BleClient, numberToUUID } from '@capacitor-community/bluetooth-le';\n\nconst HEART_RATE_SERVICE = numberToUUID(0x180d);\n\nexport async function scan(): Promise<void> {\n  try {\n    await BleClient.initialize();\n\n    await BleClient.requestLEScan(\n      {\n        services: [HEART_RATE_SERVICE],\n      },\n      (result) => {\n        console.log('received new scan result', result);\n      },\n    );\n\n    setTimeout(async () => {\n      await BleClient.stopLEScan();\n      console.log('stopped scanning');\n    }, 5000);\n  } catch (error) {\n    console.error(error);\n  }\n}\n```\n\n## Example Applications\n\n- [BLE Tester](https://github.com/sourcya/ble-tester) (Ionic/React)\n- [OpenGoPro](https://github.com/gopro/OpenGoPro/tree/main/demos/ionic/file_transfer) (Ionic/Angular)\n- [Quasar BLE](https://github.com/nunogois/quasar-ble) (Quasar/Vue)\n\n## Platform Support\n\n_Note_: web support depends on the browser, see [implementation status](https://github.com/WebBluetoothCG/web-bluetooth/blob/main/implementation-status.md).\n\n| method                                                         | Android | iOS | web |\n| -------------------------------------------------------------- | :-----: | :-: | :-: |\n| [`initialize()`](#initialize)                                  |   ✅    | ✅  | ✅  |\n| [`isEnabled()`](#isenabled)                                    |   ✅    | ✅  | --  |\n| [`requestEnable()`](#requestEnable)                            |   ✅    | ❌  | ❌  |\n| [`enable()`](#enable)                                          |   ✅    | ❌  | ❌  |\n| [`disable()`](#disable)                                        |   ✅    | ❌  | ❌  |\n| [`startEnabledNotifications(...)`](#startenablednotifications) |   ✅    | ✅  | --  |\n| [`stopEnabledNotifications()`](#stopenablednotifications)      |   ✅    | ✅  | --  |\n| [`isLocationEnabled()`](#islocationenabled)                    |   ✅    | ❌  | ❌  |\n| [`openLocationSettings()`](#openlocationsettings)              |   ✅    | ❌  | ❌  |\n| [`openBluetoothSettings()`](#openbluetoothsettings)            |   ✅    | ❌  | ❌  |\n| [`openAppSettings()`](#openappsettings)                        |   ✅    | ✅  | ❌  |\n| [`setDisplayStrings(...)`](#setdisplaystrings)                 |   ✅    | ✅  | --  |\n| [`requestDevice(...)`](#requestdevice)                         |   ✅    | ✅  | ✅  |\n| [`requestLEScan(...)`](#requestlescan)                         |   ✅    | ✅  | 🚩  |\n| [`stopLEScan()`](#stoplescan)                                  |   ✅    | ✅  | 🚩  |\n| [`getDevices(...)`](#getdevices)                               |   ✅    | ✅  | 🚩  |\n| [`getBondedDevices(...)`](#getbondeddevices)                   |   ✅    | ❌  | ❌  |\n| [`getConnectedDevices(...)`](#getconnecteddevices)             |   ✅    | ✅  | 🚩  |\n| [`connect(...)`](#connect)                                     |   ✅    | ✅  | ✅  |\n| [`createBond(...)`](#createbond)                               |   ✅    | ❌  | ❌  |\n| [`isBonded(...)`](#isbonded)                                   |   ✅    | ❌  | ❌  |\n| [`disconnect(...)`](#disconnect)                               |   ✅    | ✅  | ✅  |\n| [`getServices(...)`](#getservices)                             |   ✅    | ✅  | ✅  |\n| [`discoverServices(...)`](#discoverservices)                   |   ✅    | ✅  | ❌  |\n| [`getMtu(...)`](#getmtu)                                       |   ✅    | ✅  | ❌  |\n| [`requestConnectionPriority(...)`](#requestconnectionpriority) |   ✅    | ❌  | ❌  |\n| [`readRssi(...)`](#readrssi)                                   |   ✅    | ✅  | ❌  |\n| [`read(...)`](#read)                                           |   ✅    | ✅  | ✅  |\n| [`write(...)`](#write)                                         |   ✅    | ✅  | ✅  |\n| [`readDescriptor(...)`](#readdescriptor)                       |   ✅    | ✅  | ✅  |\n| [`writeDescriptor(...)`](#writedescriptor)                     |   ✅    | ✅  | ✅  |\n| [`writeWithoutResponse(...)`](#writewithoutresponse)           |   ✅    | ✅  | ✅  |\n| [`startNotifications(...)`](#startnotifications)               |   ✅    | ✅  | ✅  |\n| [`stopNotifications(...)`](#stopnotifications)                 |   ✅    | ✅  | ✅  |\n\n#### Legend\n\n- ✅ supported\n- ❌ not supported (throws an `unavailable` error)\n- 🚩 behind a flag in Chrome (see [implementation status](https://github.com/WebBluetoothCG/web-bluetooth/blob/main/implementation-status.md))\n- -- not supported, but does not throw an error\n\n## API\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### initialize(...)\n\n```typescript\ninitialize(options?: InitializeOptions | undefined) => Promise<void>\n```\n\nInitialize Bluetooth Low Energy (BLE). If it fails, BLE might be unavailable on this device.\nOn **Android** it will ask for the location permission. On **iOS** it will ask for the Bluetooth permission.\nFor an example, see [usage](#usage).\n\n| Param         | Type                                                            |\n| ------------- | --------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#initializeoptions\">InitializeOptions</a></code> |\n\n---\n\n### isEnabled()\n\n```typescript\nisEnabled() => Promise<boolean>\n```\n\nReports whether Bluetooth is enabled on this device.\nAlways returns `true` on **web**.\n\n**Returns:** <code>Promise&lt;boolean&gt;</code>\n\n---\n\n### requestEnable()\n\n```typescript\nrequestEnable() => Promise<void>\n```\n\nRequest enabling Bluetooth. Show a system activity that allows the user to turn on Bluetooth. See https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#ACTION_REQUEST_ENABLE\nOnly available on **Android**.\n\n---\n\n### enable()\n\n```typescript\nenable() => Promise<void>\n```\n\nEnable Bluetooth.\nOnly available on **Android**.\n**Deprecated** Will fail on Android SDK &gt;= 33. Use `requestEnable` instead. See https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#enable()\n\n---\n\n### disable()\n\n```typescript\ndisable() => Promise<void>\n```\n\nDisable Bluetooth.\nOnly available on **Android**.\n**Deprecated** Will fail on Android SDK &gt;= 33. See https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#disable()\n\n---\n\n### startEnabledNotifications(...)\n\n```typescript\nstartEnabledNotifications(callback: (value: boolean) => void) => Promise<void>\n```\n\nRegister a callback function that will be invoked when Bluetooth is enabled (true) or disabled (false) on this device.\nNot available on **web** (the callback will never be invoked).\n\n| Param          | Type                                     | Description                                                |\n| -------------- | ---------------------------------------- | ---------------------------------------------------------- |\n| **`callback`** | <code>(value: boolean) =&gt; void</code> | Callback function to use when the Bluetooth state changes. |\n\n---\n\n### stopEnabledNotifications()\n\n```typescript\nstopEnabledNotifications() => Promise<void>\n```\n\nStop the enabled notifications registered with `startEnabledNotifications`.\n\n---\n\n### isLocationEnabled()\n\n```typescript\nisLocationEnabled() => Promise<boolean>\n```\n\nReports whether Location Services are enabled on this device.\nOnly available on **Android**.\n\n**Returns:** <code>Promise&lt;boolean&gt;</code>\n\n---\n\n### openLocationSettings()\n\n```typescript\nopenLocationSettings() => Promise<void>\n```\n\nOpen Location settings.\nOnly available on **Android**.\n\n---\n\n### openBluetoothSettings()\n\n```typescript\nopenBluetoothSettings() => Promise<void>\n```\n\nOpen Bluetooth settings.\nOnly available on **Android**.\n\n---\n\n### openAppSettings()\n\n```typescript\nopenAppSettings() => Promise<void>\n```\n\nOpen App settings.\nNot available on **web**.\nOn **iOS** when a user declines the request to use Bluetooth on the first call of `initialize`, it is not possible\nto request for Bluetooth again from within the app. In this case Bluetooth has to be enabled in the app settings\nfor the app to be able use it.\n\n---\n\n### setDisplayStrings(...)\n\n```typescript\nsetDisplayStrings(displayStrings: DisplayStrings) => Promise<void>\n```\n\nSet the strings that are displayed in the `requestDevice` dialog.\n\n| Param                | Type                                                      |\n| -------------------- | --------------------------------------------------------- |\n| **`displayStrings`** | <code><a href=\"#displaystrings\">DisplayStrings</a></code> |\n\n---\n\n### requestDevice(...)\n\n```typescript\nrequestDevice(options?: RequestBleDeviceOptions | undefined) => Promise<BleDevice>\n```\n\nRequest a peripheral BLE device to interact with. This will scan for available devices according to the filters in the options and show a dialog to pick a device.\nFor an example, see [usage](#usage).\n\n| Param         | Type                                                                        | Description                                                             |\n| ------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#requestbledeviceoptions\">RequestBleDeviceOptions</a></code> | Device filters, see [RequestBleDeviceOptions](#RequestBleDeviceOptions) |\n\n**Returns:** <code>Promise&lt;<a href=\"#bledevice\">BleDevice</a>&gt;</code>\n\n---\n\n### requestLEScan(...)\n\n```typescript\nrequestLEScan(options: RequestBleDeviceOptions, callback: (result: ScanResult) => void) => Promise<void>\n```\n\nStart scanning for BLE devices to interact with according to the filters in the options. The callback will be invoked on each device that is found.\nScanning will continue until `stopLEScan` is called. For an example, see [usage](#usage).\n**Note**: Use with care on **web** platform, the required API is still behind a flag in most browsers.\n\n| Param          | Type                                                                        |\n| -------------- | --------------------------------------------------------------------------- |\n| **`options`**  | <code><a href=\"#requestbledeviceoptions\">RequestBleDeviceOptions</a></code> |\n| **`callback`** | <code>(result: <a href=\"#scanresult\">ScanResult</a>) =&gt; void</code>      |\n\n---\n\n### stopLEScan()\n\n```typescript\nstopLEScan() => Promise<void>\n```\n\nStop scanning for BLE devices. For an example, see [usage](#usage).\n\n---\n\n### getDevices(...)\n\n```typescript\ngetDevices(deviceIds: string[]) => Promise<BleDevice[]>\n```\n\nOn iOS and web, if you want to connect to a previously connected device without scanning first, you can use `getDevice`.\nUses [retrievePeripherals](https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/1519127-retrieveperipherals) on iOS and\n[getDevices](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/getDevices) on web.\nOn Android, you can directly connect to the device with the deviceId.\n\n| Param           | Type                  | Description                                             |\n| --------------- | --------------------- | ------------------------------------------------------- |\n| **`deviceIds`** | <code>string[]</code> | List of device IDs, e.g. saved from a previous app run. |\n\n**Returns:** <code>Promise&lt;BleDevice[]&gt;</code>\n\n---\n\n### getBondedDevices()\n\n```typescript\ngetBondedDevices() => Promise<BleDevice[]>\n```\n\nGet a list of currently bonded devices.\nOnly available on **Android**.\nUses [getBondedDevices](<https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#getBondedDevices()>) on Android\n\n**Returns:** <code>Promise&lt;BleDevice[]&gt;</code>\n\n---\n\n### getConnectedDevices(...)\n\n```typescript\ngetConnectedDevices(services: string[]) => Promise<BleDevice[]>\n```\n\nGet a list of currently connected devices.\nUses [retrieveConnectedPeripherals](https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/1518924-retrieveconnectedperipherals) on iOS,\n[getConnectedDevices](<https://developer.android.com/reference/android/bluetooth/BluetoothManager#getConnectedDevices(int)>) on Android\nand [getDevices](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/getDevices) on web.\n\n| Param          | Type                  | Description                                                                                                              |\n| -------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------ |\n| **`services`** | <code>string[]</code> | List of services to filter the devices by. If no service is specified, no devices will be returned. Only applies to iOS. |\n\n**Returns:** <code>Promise&lt;BleDevice[]&gt;</code>\n\n---\n\n### connect(...)\n\n```typescript\nconnect(deviceId: string, onDisconnect?: ((deviceId: string) => void) | undefined, options?: TimeoutOptions | undefined) => Promise<void>\n```\n\nConnect to a peripheral BLE device. For an example, see [usage](#usage).\n\n| Param              | Type                                                      | Description                                                                                                    |\n| ------------------ | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`**     | <code>string</code>                                       | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n| **`onDisconnect`** | <code>((deviceId: string) =&gt; void)</code>              | Optional disconnect callback function that will be used when the device disconnects                            |\n| **`options`**      | <code><a href=\"#timeoutoptions\">TimeoutOptions</a></code> | Options for plugin call                                                                                        |\n\n---\n\n### createBond(...)\n\n```typescript\ncreateBond(deviceId: string, options?: TimeoutOptions | undefined) => Promise<void>\n```\n\nCreate a bond with a peripheral BLE device.\nOnly available on **Android**. On iOS bonding is handled by the OS.\n\n| Param          | Type                                                      | Description                                                                                                    |\n| -------------- | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`** | <code>string</code>                                       | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n| **`options`**  | <code><a href=\"#timeoutoptions\">TimeoutOptions</a></code> | Options for plugin call                                                                                        |\n\n---\n\n### isBonded(...)\n\n```typescript\nisBonded(deviceId: string) => Promise<boolean>\n```\n\nReport whether a peripheral BLE device is bonded.\nOnly available on **Android**. On iOS bonding is handled by the OS.\n\n| Param          | Type                | Description                                                                                                    |\n| -------------- | ------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`** | <code>string</code> | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n\n**Returns:** <code>Promise&lt;boolean&gt;</code>\n\n---\n\n### disconnect(...)\n\n```typescript\ndisconnect(deviceId: string) => Promise<void>\n```\n\nDisconnect from a peripheral BLE device. For an example, see [usage](#usage).\n\n| Param          | Type                | Description                                                                                                    |\n| -------------- | ------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`** | <code>string</code> | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n\n---\n\n### getServices(...)\n\n```typescript\ngetServices(deviceId: string) => Promise<BleService[]>\n```\n\nGet services, characteristics and descriptors of a device.\n\n| Param          | Type                | Description                                                                                                    |\n| -------------- | ------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`** | <code>string</code> | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n\n**Returns:** <code>Promise&lt;BleService[]&gt;</code>\n\n---\n\n### discoverServices(...)\n\n```typescript\ndiscoverServices(deviceId: string) => Promise<void>\n```\n\nDiscover services, characteristics and descriptors of a device.\nYou only need this method if your peripheral device changes its services and characteristics at runtime.\nIf the discovery was successful, the remote services can be retrieved using the getServices function.\nNot available on **web**.\n\n| Param          | Type                | Description                                                                                                    |\n| -------------- | ------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`** | <code>string</code> | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n\n---\n\n### getMtu(...)\n\n```typescript\ngetMtu(deviceId: string) => Promise<number>\n```\n\nGet the MTU of a connected device. Note that the maximum write value length is 3 bytes less than the MTU.\nNot available on **web**.\n\n| Param          | Type                | Description                                                                                                    |\n| -------------- | ------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`** | <code>string</code> | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n\n**Returns:** <code>Promise&lt;number&gt;</code>\n\n---\n\n### requestConnectionPriority(...)\n\n```typescript\nrequestConnectionPriority(deviceId: string, connectionPriority: ConnectionPriority) => Promise<void>\n```\n\nRequest a connection parameter update.\nOnly available on **Android**. https://developer.android.com/reference/android/bluetooth/BluetoothGatt#requestConnectionPriority(int)\n\n| Param                    | Type                                                              | Description                                                                                                    |\n| ------------------------ | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`**           | <code>string</code>                                               | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n| **`connectionPriority`** | <code><a href=\"#connectionpriority\">ConnectionPriority</a></code> | Request a specific connection priority. See [ConnectionPriority](#connectionpriority)                          |\n\n---\n\n### readRssi(...)\n\n```typescript\nreadRssi(deviceId: string) => Promise<number>\n```\n\nRead the RSSI value of a connected device.\nNot available on **web**.\n\n| Param          | Type                | Description                                                                                                    |\n| -------------- | ------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`** | <code>string</code> | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n\n**Returns:** <code>Promise&lt;number&gt;</code>\n\n---\n\n### read(...)\n\n```typescript\nread(deviceId: string, service: string, characteristic: string, options?: TimeoutOptions | undefined) => Promise<DataView>\n```\n\nRead the value of a characteristic. For an example, see [usage](#usage).\n\n| Param                | Type                                                      | Description                                                                                                    |\n| -------------------- | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`**       | <code>string</code>                                       | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n| **`service`**        | <code>string</code>                                       | UUID of the service (see [UUID format](#uuid-format))                                                          |\n| **`characteristic`** | <code>string</code>                                       | UUID of the characteristic (see [UUID format](#uuid-format))                                                   |\n| **`options`**        | <code><a href=\"#timeoutoptions\">TimeoutOptions</a></code> | Options for plugin call                                                                                        |\n\n**Returns:** <code>Promise&lt;<a href=\"#dataview\">DataView</a>&gt;</code>\n\n---\n\n### write(...)\n\n```typescript\nwrite(deviceId: string, service: string, characteristic: string, value: DataView, options?: TimeoutOptions | undefined) => Promise<void>\n```\n\nWrite a value to a characteristic. For an example, see [usage](#usage).\n\n| Param                | Type                                                      | Description                                                                                                                                                                                 |\n| -------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`**       | <code>string</code>                                       | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan))                                                                              |\n| **`service`**        | <code>string</code>                                       | UUID of the service (see [UUID format](#uuid-format))                                                                                                                                       |\n| **`characteristic`** | <code>string</code>                                       | UUID of the characteristic (see [UUID format](#uuid-format))                                                                                                                                |\n| **`value`**          | <code><a href=\"#dataview\">DataView</a></code>             | The value to write as a <a href=\"#dataview\">DataView</a>. To create a <a href=\"#dataview\">DataView</a> from an array of numbers, there is a helper function, e.g. numbersToDataView([1, 0]) |\n| **`options`**        | <code><a href=\"#timeoutoptions\">TimeoutOptions</a></code> | Options for plugin call                                                                                                                                                                     |\n\n---\n\n### writeWithoutResponse(...)\n\n```typescript\nwriteWithoutResponse(deviceId: string, service: string, characteristic: string, value: DataView, options?: TimeoutOptions | undefined) => Promise<void>\n```\n\nWrite a value to a characteristic without waiting for a response.\n\n| Param                | Type                                                      | Description                                                                                                                                                                                 |\n| -------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`**       | <code>string</code>                                       | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan))                                                                              |\n| **`service`**        | <code>string</code>                                       | UUID of the service (see [UUID format](#uuid-format))                                                                                                                                       |\n| **`characteristic`** | <code>string</code>                                       | UUID of the characteristic (see [UUID format](#uuid-format))                                                                                                                                |\n| **`value`**          | <code><a href=\"#dataview\">DataView</a></code>             | The value to write as a <a href=\"#dataview\">DataView</a>. To create a <a href=\"#dataview\">DataView</a> from an array of numbers, there is a helper function, e.g. numbersToDataView([1, 0]) |\n| **`options`**        | <code><a href=\"#timeoutoptions\">TimeoutOptions</a></code> | Options for plugin call                                                                                                                                                                     |\n\n---\n\n### readDescriptor(...)\n\n```typescript\nreadDescriptor(deviceId: string, service: string, characteristic: string, descriptor: string, options?: TimeoutOptions | undefined) => Promise<DataView>\n```\n\nRead the value of a descriptor.\n\n| Param                | Type                                                      | Description                                                                                                    |\n| -------------------- | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`**       | <code>string</code>                                       | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n| **`service`**        | <code>string</code>                                       | UUID of the service (see [UUID format](#uuid-format))                                                          |\n| **`characteristic`** | <code>string</code>                                       | UUID of the characteristic (see [UUID format](#uuid-format))                                                   |\n| **`descriptor`**     | <code>string</code>                                       | UUID of the descriptor (see [UUID format](#uuid-format))                                                       |\n| **`options`**        | <code><a href=\"#timeoutoptions\">TimeoutOptions</a></code> | Options for plugin call                                                                                        |\n\n**Returns:** <code>Promise&lt;<a href=\"#dataview\">DataView</a>&gt;</code>\n\n---\n\n### writeDescriptor(...)\n\n```typescript\nwriteDescriptor(deviceId: string, service: string, characteristic: string, descriptor: string, value: DataView, options?: TimeoutOptions | undefined) => Promise<void>\n```\n\nWrite a value to a descriptor.\n\n| Param                | Type                                                      | Description                                                                                                                                                                                 |\n| -------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`**       | <code>string</code>                                       | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan))                                                                              |\n| **`service`**        | <code>string</code>                                       | UUID of the service (see [UUID format](#uuid-format))                                                                                                                                       |\n| **`characteristic`** | <code>string</code>                                       | UUID of the characteristic (see [UUID format](#uuid-format))                                                                                                                                |\n| **`descriptor`**     | <code>string</code>                                       | UUID of the descriptor (see [UUID format](#uuid-format))                                                                                                                                    |\n| **`value`**          | <code><a href=\"#dataview\">DataView</a></code>             | The value to write as a <a href=\"#dataview\">DataView</a>. To create a <a href=\"#dataview\">DataView</a> from an array of numbers, there is a helper function, e.g. numbersToDataView([1, 0]) |\n| **`options`**        | <code><a href=\"#timeoutoptions\">TimeoutOptions</a></code> | Options for plugin call                                                                                                                                                                     |\n\n---\n\n### startNotifications(...)\n\n```typescript\nstartNotifications(deviceId: string, service: string, characteristic: string, callback: (value: DataView) => void) => Promise<void>\n```\n\nStart listening to changes of the value of a characteristic.\nNote that you should only start the notifications once per characteristic in your app and share the data and\nnot call `startNotifications` in every component that needs the data.\nFor an example, see [usage](#usage).\n\n| Param                | Type                                                              | Description                                                                                                    |\n| -------------------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`**       | <code>string</code>                                               | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n| **`service`**        | <code>string</code>                                               | UUID of the service (see [UUID format](#uuid-format))                                                          |\n| **`characteristic`** | <code>string</code>                                               | UUID of the characteristic (see [UUID format](#uuid-format))                                                   |\n| **`callback`**       | <code>(value: <a href=\"#dataview\">DataView</a>) =&gt; void</code> | Callback function to use when the value of the characteristic changes                                          |\n\n---\n\n### stopNotifications(...)\n\n```typescript\nstopNotifications(deviceId: string, service: string, characteristic: string) => Promise<void>\n```\n\nStop listening to the changes of the value of a characteristic. For an example, see [usage](#usage).\n\n| Param                | Type                | Description                                                                                                    |\n| -------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`**       | <code>string</code> | The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) |\n| **`service`**        | <code>string</code> | UUID of the service (see [UUID format](#uuid-format))                                                          |\n| **`characteristic`** | <code>string</code> | UUID of the characteristic (see [UUID format](#uuid-format))                                                   |\n\n---\n\n### Interfaces\n\n#### InitializeOptions\n\n| Prop                          | Type                 | Description                                                                                                                                                                                                                                                                                                                                      | Default            |\n| ----------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ |\n| **`androidNeverForLocation`** | <code>boolean</code> | If your app doesn't use Bluetooth scan results to derive physical location information, you can strongly assert that your app doesn't derive physical location. (Android only) Requires adding 'neverForLocation' to AndroidManifest.xml https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#assert-never-for-location | <code>false</code> |\n\n#### DisplayStrings\n\n| Prop                   | Type                | Default                          | Since |\n| ---------------------- | ------------------- | -------------------------------- | ----- |\n| **`scanning`**         | <code>string</code> | <code>\"Scanning...\"</code>       | 0.0.1 |\n| **`cancel`**           | <code>string</code> | <code>\"Cancel\"</code>            | 0.0.1 |\n| **`availableDevices`** | <code>string</code> | <code>\"Available devices\"</code> | 0.0.1 |\n| **`noDeviceFound`**    | <code>string</code> | <code>\"No device found\"</code>   | 0.0.1 |\n\n#### BleDevice\n\n| Prop           | Type                  | Description                                                                                                                                       |\n| -------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`deviceId`** | <code>string</code>   | ID of the device, which will be needed for further calls. On **Android** this is the BLE MAC address. On **iOS** and **web** it is an identifier. |\n| **`name`**     | <code>string</code>   | Name of the peripheral device.                                                                                                                    |\n| **`uuids`**    | <code>string[]</code> |                                                                                                                                                   |\n\n#### RequestBleDeviceOptions\n\n| Prop                   | Type                                          | Description                                                                                                                                                                                                                                               |\n| ---------------------- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`services`**         | <code>string[]</code>                         | Filter devices by service UUIDs. UUIDs have to be specified as 128 bit UUID strings, e.g. ['0000180d-0000-1000-8000-00805f9b34fb'] There is a helper function to convert numbers to UUIDs. e.g. [numberToUUID(0x180f)]. (see [UUID format](#uuid-format)) |\n| **`name`**             | <code>string</code>                           | Filter devices by name                                                                                                                                                                                                                                    |\n| **`namePrefix`**       | <code>string</code>                           | Filter devices by name prefix                                                                                                                                                                                                                             |\n| **`optionalServices`** | <code>string[]</code>                         | For **web**, all services that will be used have to be listed under services or optionalServices, e.g. [numberToUUID(0x180f)] (see [UUID format](#uuid-format))                                                                                           |\n| **`allowDuplicates`**  | <code>boolean</code>                          | Normally scans will discard the second and subsequent advertisements from a single device. If you need to receive them, set allowDuplicates to true (only applicable in `requestLEScan`). (default: false)                                                |\n| **`scanMode`**         | <code><a href=\"#scanmode\">ScanMode</a></code> | Android scan mode (default: <a href=\"#scanmode\">ScanMode.SCAN_MODE_BALANCED</a>)                                                                                                                                                                          |\n\n#### ScanResult\n\n| Prop                   | Type                                                              | Description                                                                                                                                                                                                                                                                                           |\n| ---------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`device`**           | <code><a href=\"#bledevice\">BleDevice</a></code>                   | The peripheral device that was found in the scan. **Android** and **web**: `device.name` is always identical to `localName`. **iOS**: `device.name` is identical to `localName` the first time a device is discovered, but after connecting `device.name` is the cached GAP name in subsequent scans. |\n| **`localName`**        | <code>string</code>                                               | The name of the peripheral device from the advertisement data.                                                                                                                                                                                                                                        |\n| **`rssi`**             | <code>number</code>                                               | Received Signal Strength Indication.                                                                                                                                                                                                                                                                  |\n| **`txPower`**          | <code>number</code>                                               | Transmit power in dBm. A value of 127 indicates that it is not available.                                                                                                                                                                                                                             |\n| **`manufacturerData`** | <code>{ [key: string]: <a href=\"#dataview\">DataView</a>; }</code> | Manufacturer data, key is a company identifier and value is the data.                                                                                                                                                                                                                                 |\n| **`serviceData`**      | <code>{ [key: string]: <a href=\"#dataview\">DataView</a>; }</code> | Service data, key is a service UUID and value is the data.                                                                                                                                                                                                                                            |\n| **`uuids`**            | <code>string[]</code>                                             | Advertised services.                                                                                                                                                                                                                                                                                  |\n| **`rawAdvertisement`** | <code><a href=\"#dataview\">DataView</a></code>                     | Raw advertisement data (**Android** only).                                                                                                                                                                                                                                                            |\n\n#### DataView\n\n| Prop             | Type                                                |\n| ---------------- | --------------------------------------------------- |\n| **`buffer`**     | <code><a href=\"#arraybuffer\">ArrayBuffer</a></code> |\n| **`byteLength`** | <code>number</code>                                 |\n| **`byteOffset`** | <code>number</code>                                 |\n\n| Method         | Signature                                                                           | Description                                                                                                                                                         |\n| -------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **getFloat32** | (byteOffset: number, littleEndian?: boolean \\| undefined) =&gt; number              | Gets the Float32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. |\n| **getFloat64** | (byteOffset: number, littleEndian?: boolean \\| undefined) =&gt; number              | Gets the Float64 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset. |\n| **getInt8**    | (byteOffset: number) =&gt; number                                                   | Gets the Int8 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.    |\n| **getInt16**   | (byteOffset: number, littleEndian?: boolean \\| undefined) =&gt; number              | Gets the Int16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.   |\n| **getInt32**   | (byteOffset: number, littleEndian?: boolean \\| undefined) =&gt; number              | Gets the Int32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.   |\n| **getUint8**   | (byteOffset: number) =&gt; number                                                   | Gets the Uint8 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.   |\n| **getUint16**  | (byteOffset: number, littleEndian?: boolean \\| undefined) =&gt; number              | Gets the Uint16 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.  |\n| **getUint32**  | (byteOffset: number, littleEndian?: boolean \\| undefined) =&gt; number              | Gets the Uint32 value at the specified byte offset from the start of the view. There is no alignment constraint; multi-byte values may be fetched from any offset.  |\n| **setFloat32** | (byteOffset: number, value: number, littleEndian?: boolean \\| undefined) =&gt; void | Stores an Float32 value at the specified byte offset from the start of the view.                                                                                    |\n| **setFloat64** | (byteOffset: number, value: number, littleEndian?: boolean \\| undefined) =&gt; void | Stores an Float64 value at the specified byte offset from the start of the view.                                                                                    |\n| **setInt8**    | (byteOffset: number, value: number) =&gt; void                                      | Stores an Int8 value at the specified byte offset from the start of the view.                                                                                       |\n| **setInt16**   | (byteOffset: number, value: number, littleEndian?: boolean \\| undefined) =&gt; void | Stores an Int16 value at the specified byte offset from the start of the view.                                                                                      |\n| **setInt32**   | (byteOffset: number, value: number, littleEndian?: boolean \\| undefined) =&gt; void | Stores an Int32 value at the specified byte offset from the start of the view.                                                                                      |\n| **setUint8**   | (byteOffset: number, value: number) =&gt; void                                      | Stores an Uint8 value at the specified byte offset from the start of the view.                                                                                      |\n| **setUint16**  | (byteOffset: number, value: number, littleEndian?: boolean \\| undefined) =&gt; void | Stores an Uint16 value at the specified byte offset from the start of the view.                                                                                     |\n| **setUint32**  | (byteOffset: number, value: number, littleEndian?: boolean \\| undefined) =&gt; void | Stores an Uint32 value at the specified byte offset from the start of the view.                                                                                     |\n\n#### ArrayBuffer\n\nRepresents a raw buffer of binary data, which is used to store data for the\ndifferent typed arrays. ArrayBuffers cannot be read from or written to directly,\nbut can be passed to a typed array or <a href=\"#dataview\">DataView</a> Object to interpret the raw\nbuffer as needed.\n\n| Prop             | Type                | Description                                                                     |\n| ---------------- | ------------------- | ------------------------------------------------------------------------------- |\n| **`byteLength`** | <code>number</code> | Read-only. The length of the <a href=\"#arraybuffer\">ArrayBuffer</a> (in bytes). |\n\n| Method    | Signature                                                                               | Description                                                     |\n| --------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------- |\n| **slice** | (begin: number, end?: number \\| undefined) =&gt; <a href=\"#arraybuffer\">ArrayBuffer</a> | Returns a section of an <a href=\"#arraybuffer\">ArrayBuffer</a>. |\n\n#### TimeoutOptions\n\n| Prop          | Type                | Description                                                                                                |\n| ------------- | ------------------- | ---------------------------------------------------------------------------------------------------------- |\n| **`timeout`** | <code>number</code> | Timeout in milliseconds for plugin call. Default is 10000 for `connect` and 5000 for other plugin methods. |\n\n#### BleService\n\n| Prop                  | Type                             |\n| --------------------- | -------------------------------- |\n| **`uuid`**            | <code>string</code>              |\n| **`characteristics`** | <code>BleCharacteristic[]</code> |\n\n#### BleCharacteristic\n\n| Prop              | Type                                                                                |\n| ----------------- | ----------------------------------------------------------------------------------- |\n| **`uuid`**        | <code>string</code>                                                                 |\n| **`properties`**  | <code><a href=\"#blecharacteristicproperties\">BleCharacteristicProperties</a></code> |\n| **`descriptors`** | <code>BleDescriptor[]</code>                                                        |\n\n#### BleCharacteristicProperties\n\n| Prop                             | Type                 |\n| -------------------------------- | -------------------- |\n| **`broadcast`**                  | <code>boolean</code> |\n| **`read`**                       | <code>boolean</code> |\n| **`writeWithoutResponse`**       | <code>boolean</code> |\n| **`write`**                      | <code>boolean</code> |\n| **`notify`**                     | <code>boolean</code> |\n| **`indicate`**                   | <code>boolean</code> |\n| **`authenticatedSignedWrites`**  | <code>boolean</code> |\n| **`reliableWrite`**              | <code>boolean</code> |\n| **`writableAuxiliaries`**        | <code>boolean</code> |\n| **`extendedProperties`**         | <code>boolean</code> |\n| **`notifyEncryptionRequired`**   | <code>boolean</code> |\n| **`indicateEncryptionRequired`** | <code>boolean</code> |\n\n#### BleDescriptor\n\n| Prop       | Type                |\n| ---------- | ------------------- |\n| **`uuid`** | <code>string</code> |\n\n### Enums\n\n#### ScanMode\n\n| Members                     | Value          | Description                                                                                                                                                                                                                                                               |\n| --------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **`SCAN_MODE_LOW_POWER`**   | <code>0</code> | Perform Bluetooth LE scan in low power mode. This mode is enforced if the scanning application is not in foreground. https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_POWER                                                        |\n| **`SCAN_MODE_BALANCED`**    | <code>1</code> | Perform Bluetooth LE scan in balanced power mode. (default) Scan results are returned at a rate that provides a good trade-off between scan frequency and power consumption. https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_BALANCED |\n| **`SCAN_MODE_LOW_LATENCY`** | <code>2</code> | Scan using highest duty cycle. It's recommended to only use this mode when the application is running in the foreground. https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_LATENCY                                                  |\n\n#### ConnectionPriority\n\n| Members                             | Value          | Description                                                                                                                                                                                                                                                                                                                                                                                                        |\n","readmeFilename":"README.md"}