connectivity-samples icon indicating copy to clipboard operation
connectivity-samples copied to clipboard

Logical mistake

Open vicentek6 opened this issue 4 years ago • 1 comments

In file connectivity-samples/BluetoothLeGatt/Application/src/main/java/com/example/android/bluetoothlegatt/DeviceControlActivity.java In line 129: if ((charaProp | BluetoothGattCharacteristic.PROPERTY_READ) > 0) { and line 139: if ((charaProp | BluetoothGattCharacteristic.PROPERTY_NOTIFY) > 0) { there must be a bitwise "and" &: Bitwise "or" will always be true Regards.

vicentek6 avatar Apr 13 '20 16:04 vicentek6

It is very sad that a simple bug like this identified 6 years ago is still not fixed. https://github.com/android/connectivity-samples/issues/46

jpliew avatar Dec 08 '21 06:12 jpliew