BluetoothEmulation.emulateAdapter() 方法
模拟蓝牙适配器。蓝牙模拟所必需。参见 bluetooth.simulateAdapter。
签名
interface BluetoothEmulation {
emulateAdapter(state: AdapterState, leSupported?: boolean): Promise<void>;
}
参数
|
参数 |
类型 |
说明 |
|---|---|---|
|
state |
所需的蓝牙适配器状态。 | |
|
leSupported |
boolean |
(可选) 标记适配器是否支持低功耗蓝牙。 |
返回值:
Promise<void>