我知道一个特征只能有一个属性和一个权限,并且该属性必须与权限具有相同的值,例如如果特征具有写入权限,则它必须具有可写的属性...那么如何使特征可读且可写?
例如
如何转动
int permission = BluetoothGattCharacteristic.PERMISSION_WRITE;
int property = BluetoothGattCharacteristic.PROPERTY_WRITE;
分为读和写
最佳答案
使用口罩
int permission = BluetoothGattCharacteristic.PERMISSION_WRITE | BluetoothGattCharacteristic.PERMISSION_READ;
int property = BluetoothGattCharacteristic.PROPERTY_WRITE|BluetoothGattCharacteristic.PROPERTY_READ;
关于android - 如何让一个特性既可以读又可以写?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47341515/