Skip to main content
Use this API to close the Bluetooth adapter and release system resources. Call this when you’re done using Bluetooth.

Parameters

Code Example

Basic Usage

Complete Bluetooth Lifecycle

Always close the Bluetooth adapter in onUnload to ensure resources are properly released when leaving the page.

my.openBluetoothAdapter

Initialize Bluetooth

my.getBluetoothAdapterState

Get adapter state