public class DescriptorHelper extends Object
Modifier and Type | Field and Description |
---|---|
static BluetoothUuid |
CCC_UUID
UUID of the Client Characteristic Configuration descriptor.
|
static BluetoothUuid |
CUD_UUID
UUID of the Characteristic User Description descriptor.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkIndicationsEnabled(byte[] value)
Returns whether indications are enabled in the given CCC descriptor value.
|
static boolean |
checkNotificationsEnabled(byte[] value)
Returns whether notifications are enabled in the given CCC descriptor value.
|
static byte[] |
createCccValue(boolean notificationsEnabled,
boolean indicationsEnabled)
Creates a CCC descriptor value specifying whether or not notifications and indications should be enabled.
|
public static final BluetoothUuid CCC_UUID
public static final BluetoothUuid CUD_UUID
public static boolean checkIndicationsEnabled(byte[] value)
value
- the value of the CCC descriptor.public static boolean checkNotificationsEnabled(byte[] value)
value
- the value of the CCC descriptor.public static byte[] createCccValue(boolean notificationsEnabled, boolean indicationsEnabled)
notificationsEnabled
- whether notifications should be enabled.indicationsEnabled
- whether indications should be enabled.