BluetoothRemoteGATTService
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
TheBluetoothRemoteGATTService interface of theWeb Bluetooth API represents aservice provided by a GATT server, including a device, a list of referenced services,and a list of the characteristics of this service.
In this article
Instance properties
BluetoothRemoteGATTService.deviceRead onlyExperimentalReturns information about a Bluetooth device through an instance of
BluetoothDevice.BluetoothRemoteGATTService.isPrimaryRead onlyExperimentalReturns a boolean value indicating whether this is a primary or secondaryservice.
BluetoothRemoteGATTService.uuidRead onlyExperimentalReturns a string representing the UUID of this service.
Instance methods
BluetoothRemoteGATTService.getCharacteristic()ExperimentalReturns a
Promiseto an instance ofBluetoothRemoteGATTCharacteristicfor a given universally unique identifier(UUID).BluetoothRemoteGATTService.getCharacteristics()ExperimentalReturns a
Promiseto anArrayofBluetoothRemoteGATTCharacteristicinstances for an optional universallyunique identifier (UUID).
Specifications
| Specification |
|---|
| Web Bluetooth> # bluetoothgattservice-interface> |