BluetoothEmulation.emulateAdapter() 方法
¥BluetoothEmulation.emulateAdapter() method
模拟蓝牙适配器。蓝牙模拟的必需项,请参阅 bluetooth.simulateAdapter。
¥Emulate Bluetooth adapter. Required for bluetooth simulations See bluetooth.simulateAdapter.
签名
¥Signature
interface BluetoothEmulation {
emulateAdapter(state: AdapterState, leSupported?: boolean): Promise<void>;
}
参数
¥Parameters
范围 | 类型 | 描述 |
|---|---|---|
state | 所需的蓝牙适配器状态。 | |
leSupported | boolean | (可选的)标记适配器是否支持低功耗蓝牙。 |
Returns:
Promise<void>