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
|
范围 🌐 Parameter |
类型 🌐 Type |
描述 🌐 Description |
|---|---|---|
|
state |
所需的蓝牙适配器状态。 🌐 The desired bluetooth adapter state. | |
|
leSupported |
boolean |
(可选) 标记适配器是否支持低功耗蓝牙。 🌐 (Optional) Mark if the adapter supports low-energy bluetooth. |
返回:
Promise<void>