Skip to content Skip to sidebar Skip to footer

How To Make A Characteristic Both Read And Write?

I understand that a characteristic can have only one property and one permission, and that the property must have the same value as the permission e.g. a characteristic must have t

Solution 1:

Use a mask

int permission = BluetoothGattCharacteristic.PERMISSION_WRITE | BluetoothGattCharacteristic.PERMISSION_READ;
int property = BluetoothGattCharacteristic.PROPERTY_WRITE|BluetoothGattCharacteristic.PROPERTY_READ;

Post a Comment for "How To Make A Characteristic Both Read And Write?"