public class BluetoothCharacteristic extends BluetoothAttribute
BluetoothCharacteristic
class represents a remote or a local GATT characteristic.
Remote characteristics may be retrieved by getting the
characteristics
of a remote service.
Local characteristics may be retrieved by adding a
local service
to the adapter.
This class provides methods to get the properties of the characteristic and to get its descriptors.
Modifier and Type | Method and Description |
---|---|
BluetoothDescriptor |
getDescriptor(int index)
Returns the descriptor at the given index in this characteristic.
|
int |
getNumDescriptors()
Returns the number of descriptors in this characteristic.
|
byte |
getProperties()
Returns the properties of this characteristic.
|
getService, getUuid
public BluetoothDescriptor getDescriptor(int index)
index
- the index of the descriptor.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= getNumDescriptors()
).public int getNumDescriptors()
public byte getProperties()
BluetoothProperties
).