# wx.onBluetoothAdapterStateChange(function callback)

Start from base library version 1.1.0. Please remaining backward compatible.

with Promise style call: Not supported

Mini Program plugin: Support, need to Mini Program base library version no less than 2.9.1

Monitor Bluetooth Adapter State Change Event

# parameter

# function callback

Callback function for Bluetooth adapter state change event

# parameter

# Object res
attribute type Introductions
available boolean Is the Bluetooth adapter available?
discovering boolean Is the Bluetooth adapter in a search state?

# sample code

Preview with Developer Tool

wx.onBluetoothAdapterStateChange(function (res) {
  console.log('adapterState changed, now is', res)