### Installing SwiftLint (macOS) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Installs the SwiftLint tool using Homebrew on macOS. SwiftLint is used for enforcing Swift code style and conventions. ```shell brew install swiftlint ``` -------------------------------- ### Installing Dependencies (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Installs the project's required Node.js dependencies listed in the package.json file. This is a necessary step for setting up the local development environment. ```shell npm install ``` -------------------------------- ### Verifying Build Before Publishing (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Runs the verification script as part of the publishing checklist to confirm that the plugin builds correctly for all platforms before releasing. ```bash npm run verify ``` -------------------------------- ### Creating Development Release Version (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Runs the versioning script to create a development release version. This is typically used for pre-release or unstable builds. ```bash npm run version:dev ``` -------------------------------- ### Install Capacitor Bluetooth LE Plugin Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Use npm to install the plugin package and then sync the Capacitor project to update native platforms with the plugin code. ```shell npm install @capacitor-community/bluetooth-le npx cap sync ``` -------------------------------- ### Publishing to npm (Latest Tag) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Publishes the prepared plugin package to the npm registry with the 'latest' tag. This is the standard command for releasing stable versions. ```bash npm publish ``` -------------------------------- ### Publishing to npm (Next Tag) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Publishes the prepared plugin package to the npm registry with the 'next' tag. This is typically used for publishing beta or release candidate versions. ```bash npm publish --tag next ``` -------------------------------- ### Publishing to npm (Dev Tag) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Publishes the prepared plugin package to the npm registry with the 'dev' tag. This is typically used for publishing development or unstable versions. ```bash npm publish --tag dev ``` -------------------------------- ### Building Plugin Assets (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Runs the build script to compile TypeScript source code into JavaScript (ESM and bundled), and generates plugin API documentation. This prepares the plugin for use. ```shell npm run build ``` -------------------------------- ### Checking Code Style Before Publishing (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Runs the linting script as part of the publishing checklist to ensure code quality and style consistency before releasing a new version. ```bash npm run lint ``` -------------------------------- ### Releasing Major Version (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Runs the release script specifically for creating a new major version of the plugin. Used for releases that include breaking changes. ```bash npm run release:major ``` -------------------------------- ### Starting Characteristic Notifications (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Starts listening for value changes on a Bluetooth LE characteristic. Requires the device ID, service UUID, characteristic UUID, and a callback function that receives the new value as a DataView. It is recommended to start notifications only once per characteristic and share the data across components. ```typescript startNotifications(deviceId: string, service: string, characteristic: string, callback: (value: DataView) => void) => Promise ``` -------------------------------- ### Releasing Minor Version (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Runs the release script specifically for creating a new minor version of the plugin. Used for releases that include new features in a backward-compatible manner. ```bash npm run release:minor ``` -------------------------------- ### Start BLE Scan - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Starts scanning for BLE devices according to the specified options. A callback function is invoked for each device found. Scanning continues until `stopLEScan` is called. Use with caution on web due to experimental API status. ```TypeScript requestLEScan(options: RequestBleDeviceOptions, callback: (result: ScanResult) => void) => Promise ``` -------------------------------- ### Releasing Patch Version (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Runs the default release script to create a new patch version of the plugin. This command handles version bumping, changelog updates, and git tagging. ```bash npm run release ``` -------------------------------- ### Fixing Code Style Before Publishing (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Runs the formatting script to automatically fix any code style issues reported by the linter, used when `npm run lint` finds errors. ```bash npm run fmt ``` -------------------------------- ### Checking/Fixing Code Style (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Runs linting tools (ESLint, Prettier, SwiftLint) to check for code style and quality issues. The `fmt` command attempts to automatically fix these issues. ```bash npm run lint # if there are linting errors npm run fmt ``` -------------------------------- ### Performing Dry Run for Release (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Executes a dry run of the release process using the `release` script. This command simulates the steps (like version bumping and changelog generation) without making actual changes or publishing. ```bash npm run release -- --dry-run ``` -------------------------------- ### Verifying Plugin Build (npm) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Executes the verify script to build and validate both the web and native projects. This command is useful for ensuring the plugin builds correctly across all supported platforms, often used in CI environments. ```shell npm run verify ``` -------------------------------- ### Pushing Git Tags After Publish Source: https://github.com/capacitor-community/bluetooth-le/blob/main/CONTRIBUTING.md Pushes the local commits and the newly created git tag (generated during the release process) to the remote origin repository on the main branch. This finalizes the release in the git history. ```bash git push --follow-tags origin main ``` -------------------------------- ### Scanning for BLE Devices with Capacitor BLE (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Provides an example of using the scanning API from the @capacitor-community/bluetooth-le plugin. It initializes the plugin, requests a Low Energy (LE) scan filtered by the Heart Rate Service, logs the scan results as they are received, and stops the scan after a specified timeout. ```TypeScript import { BleClient, numberToUUID } from '@capacitor-community/bluetooth-le'; const HEART_RATE_SERVICE = numberToUUID(0x180d); export async function scan(): Promise { try { await BleClient.initialize(); await BleClient.requestLEScan( { services: [HEART_RATE_SERVICE], }, (result) => { console.log('received new scan result', result); }, ); setTimeout(async () => { await BleClient.stopLEScan(); console.log('stopped scanning'); }, 5000); } catch (error) { console.error(error); } } ``` -------------------------------- ### Start Bluetooth State Notifications - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Registers a callback function to be invoked when the Bluetooth enabled state changes (true for enabled, false for disabled). This feature is not available on the web platform. ```TypeScript startEnabledNotifications(callback: (value: boolean) => void) => Promise ``` -------------------------------- ### Get Bluetooth LE Device Services Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Retrieves the services, characteristics, and descriptors of a connected device. This method is typically called after connecting to a device and optionally after discovering services if they change at runtime. Requires the device ID. ```typescript getServices(deviceId: string) => Promise ``` -------------------------------- ### Get Bluetooth LE Device MTU (Android/iOS) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Retrieves the Maximum Transmission Unit (MTU) for a connected device. The maximum length for write operations is 3 bytes less than the reported MTU. Not available on web. ```typescript getMtu(deviceId: string) => Promise ``` -------------------------------- ### Import BleClient Wrapper Class Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Shows the standard import statement for the BleClient wrapper class from the @capacitor-community/bluetooth-le package, which is recommended for interacting with the plugin. ```typescript // Import the wrapper class import { BleClient } from '@capacitor-community/bluetooth-le'; ``` -------------------------------- ### Initializing Capacitor Bluetooth LE Plugin (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Initializes the Bluetooth Low Energy (BLE) plugin. This method requests necessary permissions on Android (location) and iOS (Bluetooth). It should be called before performing other BLE operations. ```typescript initialize(options?: InitializeOptions | undefined) => Promise ``` -------------------------------- ### Open App Settings - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Opens the application's settings screen in the system settings. This is useful on iOS if the user initially denies Bluetooth permission, as it must then be enabled via app settings. Not available on web. ```TypeScript openAppSettings() => Promise ``` -------------------------------- ### Open Bluetooth Settings - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Opens the system's Bluetooth settings screen. This method is only available on Android. ```TypeScript openBluetoothSettings() => Promise ``` -------------------------------- ### Initialize BleClient with Android 12 neverForLocation Flag Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Demonstrates how to initialize the BleClient wrapper class, setting the androidNeverForLocation flag to true to align with the Android 12 permission configuration and avoid requiring location permissions for scanning. ```typescript import { BleClient } from '@capacitor-community/bluetooth-le'; await BleClient.initialize({ androidNeverForLocation: true }); ``` -------------------------------- ### Requesting Bluetooth Enable (Android TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Requests the user to enable Bluetooth via a system prompt. This method is only supported on Android devices. It shows the standard Android Bluetooth enable activity. ```typescript requestEnable() => Promise ``` -------------------------------- ### Reading Heart Rate with Capacitor BLE (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Demonstrates how to use the @capacitor-community/bluetooth-le plugin to connect to a BLE heart rate monitor. It shows how to initialize the plugin, request and connect to a device, read standard characteristics (body sensor location, battery level), write configuration data, and subscribe to heart rate measurement notifications. Includes helper functions for handling disconnection and parsing heart rate data. ```TypeScript import { BleClient, numbersToDataView, numberToUUID } from '@capacitor-community/bluetooth-le'; const HEART_RATE_SERVICE = '0000180d-0000-1000-8000-00805f9b34fb'; const HEART_RATE_MEASUREMENT_CHARACTERISTIC = '00002a37-0000-1000-8000-00805f9b34fb'; const BODY_SENSOR_LOCATION_CHARACTERISTIC = '00002a38-0000-1000-8000-00805f9b34fb'; const BATTERY_SERVICE = numberToUUID(0x180f); const BATTERY_CHARACTERISTIC = numberToUUID(0x2a19); const POLAR_PMD_SERVICE = 'fb005c80-02e7-f387-1cad-8acd2d8df0c8'; const POLAR_PMD_CONTROL_POINT = 'fb005c81-02e7-f387-1cad-8acd2d8df0c8'; export async function main(): Promise { try { await BleClient.initialize(); const device = await BleClient.requestDevice({ services: [HEART_RATE_SERVICE], optionalServices: [BATTERY_SERVICE, POLAR_PMD_SERVICE], }); // connect to device, the onDisconnect callback is optional await BleClient.connect(device.deviceId, (deviceId) => onDisconnect(deviceId)); console.log('connected to device', device); const result = await BleClient.read(device.deviceId, HEART_RATE_SERVICE, BODY_SENSOR_LOCATION_CHARACTERISTIC); console.log('body sensor location', result.getUint8(0)); const battery = await BleClient.read(device.deviceId, BATTERY_SERVICE, BATTERY_CHARACTERISTIC); console.log('battery level', battery.getUint8(0)); await BleClient.write(device.deviceId, POLAR_PMD_SERVICE, POLAR_PMD_CONTROL_POINT, numbersToDataView([1, 0])); console.log('written [1, 0] to control point'); await BleClient.startNotifications( device.deviceId, HEART_RATE_SERVICE, HEART_RATE_MEASUREMENT_CHARACTERISTIC, (value) => { console.log('current heart rate', parseHeartRate(value)); }, ); // disconnect after 10 sec setTimeout(async () => { await BleClient.stopNotifications(device.deviceId, HEART_RATE_SERVICE, HEART_RATE_MEASUREMENT_CHARACTERISTIC); await BleClient.disconnect(device.deviceId); console.log('disconnected from device', device); }, 10000); } catch (error) { console.error(error); } } function onDisconnect(deviceId: string): void { console.log(`device ${deviceId} disconnected`); } function parseHeartRate(value: DataView): number { const flags = value.getUint8(0); const rate16Bits = flags & 0x1; let heartRate: number; if (rate16Bits > 0) { heartRate = value.getUint16(1, true); } else { heartRate = value.getUint8(1); } return heartRate; } ``` -------------------------------- ### Configure Custom Display Strings in capacitor.config.json Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Shows how to configure custom strings for the device selection dialog (scanning, cancel, available devices, no device found) within the plugins.BluetoothLe.displayStrings section of capacitor.config.json. ```JSON { "...": "other configuration", "plugins": { "BluetoothLe": { "displayStrings": { "scanning": "Am Scannen...", "cancel": "Abbrechen", "availableDevices": "Verfügbare Geräte", "noDeviceFound": "Kein Gerät gefunden" } } } } ``` -------------------------------- ### Discover Bluetooth LE Device Services (Android/iOS) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Initiates the discovery of services, characteristics, and descriptors on a connected device. This is only necessary if the peripheral device dynamically changes its services. After successful discovery, use `getServices` to retrieve them. Not available on web. ```typescript discoverServices(deviceId: string) => Promise ``` -------------------------------- ### Open Location Settings - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Opens the system's Location settings screen. This method is only available on Android. ```TypeScript openLocationSettings() => Promise ``` -------------------------------- ### Request BLE Device - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Initiates a scan for peripheral BLE devices based on provided options and displays a dialog for the user to select a device. Returns a Promise resolving with the selected BleDevice. ```TypeScript requestDevice(options?: RequestBleDeviceOptions | undefined) => Promise ``` -------------------------------- ### Initialize BleClient with Android Location Check Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md This asynchronous function initializes the BleClient. On Android, it first checks if location services are enabled, as this is required for scanning. If location is disabled, it opens the device's location settings for the user to enable it before proceeding with the BleClient initialization. ```typescript async function initialize() {\n // Check if location is enabled\n if (Capacitor.getPlatform() === 'android') {\n const isLocationEnabled = await BleClient.isLocationEnabled();\n if (!isLocationEnabled) {\n await BleClient.openLocationSettings();\n }\n }\n await BleClient.initialize();\n} ``` -------------------------------- ### Configure iOS Info.plist for Bluetooth Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Modify the iOS Info.plist file to add the required Bluetooth usage description and optionally enable background Bluetooth capabilities by adding the 'bluetooth-central' background mode. ```xml CFBundleDevelopmentRegion en ... NSBluetoothAlwaysUsageDescription Uses Bluetooth to connect and interact with peripheral BLE devices. UIBackgroundModes bluetooth-central ``` -------------------------------- ### Default Display Strings Configuration in capacitor.config.json Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Provides the default values for the display strings used in the device selection dialog within the plugins.BluetoothLe.displayStrings section of capacitor.config.json. ```JSON { "plugins": { "BluetoothLe": { "displayStrings": { "scanning": "Scanning...", "cancel": "Cancel", "availableDevices": "Available devices", "noDeviceFound": "No device found" } } } } ``` -------------------------------- ### Set Request Device Dialog Strings - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Allows customization of the text strings displayed within the dialog shown when calling the `requestDevice` method. ```TypeScript setDisplayStrings(displayStrings: DisplayStrings) => Promise ``` -------------------------------- ### Enable Bluetooth - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Enables Bluetooth on the device. This method is only available on Android. Note that it is deprecated and will fail on Android SDK >= 33; use `requestEnable` instead. ```TypeScript enable() => Promise ``` -------------------------------- ### Troubleshooting Android Connection Failure (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Provides a workaround for potential connection failures on some Android devices by explicitly calling `disconnect()` before attempting to `connect()` to a device that may have been previously connected. ```typescript const device = await BleClient.requestDevice({ // ... }); // ... await BleClient.disconnect(device.deviceId); await BleClient.connect(device.deviceId); ``` -------------------------------- ### Writing Descriptor Value (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Writes a value to a Bluetooth LE descriptor. Requires the device ID, service UUID, characteristic UUID, descriptor UUID, the value as a DataView, and optional timeout options. The value parameter should be a DataView, which can be created from an array of numbers using a helper function like numbersToDataView([1, 0]). ```typescript writeDescriptor(deviceId: string, service: string, characteristic: string, descriptor: string, value: DataView, options?: TimeoutOptions | undefined) => Promise ``` -------------------------------- ### Writing Characteristic Value with Capacitor Bluetooth LE (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Writes a value to a specific characteristic on a connected Bluetooth LE device. Requires device ID, service UUID, characteristic UUID, and the value as a DataView. Optionally accepts timeout options. ```typescript write(deviceId: string, service: string, characteristic: string, value: DataView, options?: TimeoutOptions | undefined) => Promise ``` -------------------------------- ### Request Bluetooth LE Connection Priority (Android) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Requests an update to the connection parameters for a connected device. This method is only available on Android and allows specifying a desired connection priority. Requires the device ID and a `ConnectionPriority` value. ```typescript requestConnectionPriority(deviceId: string, connectionPriority: ConnectionPriority) => Promise ``` -------------------------------- ### Read Descriptor Value - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Reads the current value of a specific descriptor associated with a characteristic on a connected Bluetooth LE device. Requires the device ID, service UUID, characteristic UUID, and descriptor UUID. Returns a Promise that resolves with the descriptor's value as a DataView. Optional timeout options can be provided. ```TypeScript readDescriptor(deviceId: string, service: string, characteristic: string, descriptor: string, options?: TimeoutOptions | undefined) => Promise ``` -------------------------------- ### Convert 16-bit Number to 128-bit UUID (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Demonstrates how to use the `numberToUUID` helper function from the `@capacitor-community/bluetooth-le` plugin to convert a 16-bit UUID number into the required 128-bit string format. ```typescript import { numberToUUID } from '@capacitor-community/bluetooth-le'; const HEART_RATE_SERVICE = numberToUUID(0x180d); // '0000180d-0000-1000-8000-00805f9b34fb' ``` -------------------------------- ### Reading Characteristic Value with Capacitor Bluetooth LE (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Reads the value of a specific characteristic on a connected Bluetooth LE device. Requires device ID, service UUID, and characteristic UUID. Optionally accepts timeout options. ```typescript read(deviceId: string, service: string, characteristic: string, options?: TimeoutOptions | undefined) => Promise ``` -------------------------------- ### Reading RSSI with Capacitor Bluetooth LE (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Reads the Received Signal Strength Indicator (RSSI) for a connected Bluetooth LE device. This method is not supported on web platforms. ```typescript readRssi(deviceId: string) => Promise ``` -------------------------------- ### Write Characteristic Without Response - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Writes a specified value to a characteristic on a connected Bluetooth LE device without waiting for an acknowledgment from the peripheral. Requires the device ID, service UUID, characteristic UUID, and the value as a DataView. Optional timeout options can be provided. ```TypeScript writeWithoutResponse(deviceId: string, service: string, characteristic: string, value: DataView, options?: TimeoutOptions | undefined) => Promise ``` -------------------------------- ### Checking Bluetooth Enabled Status (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Checks if Bluetooth is currently enabled on the device. This method returns a boolean indicating the status. Note that it always returns true on web platforms. ```typescript isEnabled() => Promise ``` -------------------------------- ### Update AndroidManifest.xml for Android 12 Bluetooth Permissions Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Shows the required permission updates in AndroidManifest.xml for Android 12 (API 31+) to enable Bluetooth scanning without location permissions, specifically adding BLUETOOTH_SCAN with neverForLocation flag and limiting older location permissions. ```diff + + + ``` -------------------------------- ### Check Location Services Enabled - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Reports whether Location Services are currently enabled on the device. This method is only available on Android. ```TypeScript isLocationEnabled() => Promise ``` -------------------------------- ### Stop Bluetooth State Notifications - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Stops the Bluetooth enabled state notifications previously registered using `startEnabledNotifications`. ```TypeScript stopEnabledNotifications() => Promise ``` -------------------------------- ### Check Bluetooth LE Device Bonding Status (Android) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Reports whether a peripheral BLE device is bonded. This method is only available on Android; iOS handles bonding automatically via the OS. Requires the device ID obtained from scanning or requesting a device. ```typescript isBonded(deviceId: string) => Promise ``` -------------------------------- ### Stop BLE Scan - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Stops the ongoing BLE scan that was initiated using the `requestLEScan` method. ```TypeScript stopLEScan() => Promise ``` -------------------------------- ### Stopping Bluetooth LE Notifications (TypeScript) Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Stops listening for value changes on a specific characteristic of a Bluetooth LE device. Requires the device ID, service UUID, and characteristic UUID as parameters. Returns a Promise that resolves when the operation is complete. ```typescript stopNotifications(deviceId: string, service: string, characteristic: string) => Promise ``` -------------------------------- ### Disconnect from Bluetooth LE Device Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Disconnects from a peripheral BLE device. This method terminates the current connection. Requires the device ID obtained from scanning or requesting a device. ```typescript disconnect(deviceId: string) => Promise ``` -------------------------------- ### Disable Bluetooth - Capacitor Bluetooth LE - TypeScript Source: https://github.com/capacitor-community/bluetooth-le/blob/main/README.md Disables Bluetooth on the device. This method is only available on Android. Note that it is deprecated and will fail on Android SDK >= 33. ```TypeScript disable() => Promise ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.