BluetoothRemoteGATTService: getCharacteristic() 方法
BluetoothGATTService.getCharacteristic() 方法返回一個 Promise,該 Promise 解析為一個 BluetoothRemoteGATTCharacteristic 例項,對應給定的通用唯一識別符號 (UUID)。
語法
js
getCharacteristic(characteristic)
引數
characteristic-
特徵的 UUID,例如,用於心率測量特徵的
'00002a37-0000-1000-8000-00805f9b34fb'。
返回值
一個 Promise,它解析為一個 BluetoothRemoteGATTCharacteristic 例項。
規範
| 規範 |
|---|
| Web 藍牙 # dom-bluetoothremotegattservice-getcharacteristic |
瀏覽器相容性
載入中…