BluetoothRemoteGATTServer: phương thức getPrimaryServices()
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.
Phương thức BluetoothRemoteGATTServer.getPrimaryServices() trả về một promise cho danh sách các đối tượng BluetoothRemoteGATTService chính do thiết bị Bluetooth cung cấp cho một BluetoothServiceUUID được chỉ định.
Cú pháp
js
getPrimaryServices(bluetoothServiceUUID)
Tham số
bluetoothServiceUUID-
Một mã định danh duy nhất toàn cục của dịch vụ Bluetooth cho thiết bị được chỉ định.
Giá trị trả về
Một Promise được phân giải thành một danh sách các đối tượng BluetoothRemoteGATTService.
Thông số kỹ thuật
| Specification |
|---|
| Web Bluetooth> # dom-bluetoothremotegattserver-getprimaryservices> |