public class BluetoothDescriptor extends BluetoothAttribute
BluetoothDescriptor
class represents a remote or a local GATT descriptor.
Remote descriptors may be retrieved from a Bluetooth device by discovering
its services
and getting their characteristics
and
descriptors
.
Local descriptors may be created by using the class constructor
and
added
to a local characteristic.
This class provides methods to get information on the descriptor.
Constructor and Description |
---|
BluetoothDescriptor(BluetoothUuid uuid,
int permissions)
Creates a local descriptor with the given UUID and permissions.
|
Modifier and Type | Method and Description |
---|---|
BluetoothCharacteristic |
getCharacteristic()
Returns the characteristic to which this descriptor belongs.
|
getService, getUuid, sendReadRequest, sendReadResponse, sendWriteRequest, sendWriteResponse
public BluetoothDescriptor(BluetoothUuid uuid, int permissions)
This descriptor may then be added
to a local characteristic.
uuid
- the descriptor UUID.permissions
- the descriptor permissions (see BluetoothPermissions
.public BluetoothCharacteristic getCharacteristic()
This method returns null if this is a local descriptor which has not been added to a characteristic.