BluetoothGattService
#
DescriptionThe BluetoothGattService interface of the Bluetooth API represents a service provided by a GATT server, including the service definition, a list of referenced services, and a list of the characteristics of this service.
#
Interface overview#
PropertiesBluetoothGattService.characteristics
read-only
no-link
Returns a cached array of BluetoothServiceCharacteristic objects representing the characteristics of this service.BluetoothGattService.includedServices
read-only
no-link
Returns a cached array of BluetoothGattService objects representing the included services referenced by this service.BluetoothGattService.isPrimary
read-only
no-link
Returns a Boolean Indicating whether this is a primary or secondary service. The default value is false, indicating a secondary service.BluetoothGattService.uuid
read-only
no-link
Returns a DOMString representing the UUID of this service.BluetoothGattService.instanceId
read-only
no-link
Returns a number representing the instance id of this service.
#
MethodsBluetoothGattService.addCharacteristic()
Adds a characteristic to this service.BluetoothGattService.addIncludedService()
Adds a referenced included service to this service.