Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Close the Bluetooth adapter.
my.closeBluetoothAdapter({ success() { console.log('Bluetooth adapter closed'); } });
Page({ onLoad() { my.openBluetoothAdapter({ success: () => { this.startScanning(); } }); }, startScanning() { my.startBluetoothDevicesDiscovery({ success: () => { console.log('Scanning for devices...'); } }); }, stopAndCleanup() { my.stopBluetoothDevicesDiscovery(); my.closeBluetoothAdapter({ success: () => { console.log('Bluetooth cleanup complete'); } }); }, onUnload() { this.stopAndCleanup(); } });
onUnload