BluetoothRemoteGATTService
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Giao diện BluetoothRemoteGATTService của Web Bluetooth API biểu diễn một dịch vụ do máy chủ GATT cung cấp, bao gồm một thiết bị, một danh sách các dịch vụ được tham chiếu và một danh sách các đặc tính của dịch vụ này.
Thuộc tính thể hiện
BluetoothRemoteGATTService.deviceRead only Experimental-
Trả về thông tin về một thiết bị Bluetooth thông qua một thể hiện của
BluetoothDevice. BluetoothRemoteGATTService.isPrimaryRead only Experimental-
Trả về một giá trị boolean cho biết đây là dịch vụ chính hay dịch vụ phụ.
BluetoothRemoteGATTService.uuidRead only Experimental-
Trả về một chuỗi biểu diễn UUID của dịch vụ này.
Phương thức thể hiện
BluetoothRemoteGATTService.getCharacteristic()Experimental-
Trả về một
Promisetới một thể hiện củaBluetoothRemoteGATTCharacteristiccho một mã định danh duy nhất toàn cục (UUID) đã cho. BluetoothRemoteGATTService.getCharacteristics()Experimental-
Trả về một
Promisetới mộtArraycác thể hiệnBluetoothRemoteGATTCharacteristiccho một mã định danh duy nhất toàn cục (UUID) tùy chọn.
Thông số kỹ thuật
| Specification |
|---|
| Web Bluetooth> # bluetoothgattservice-interface> |