MCPcopy Create free account
hub / github.com/XCSoar/XCSoar / doEnableNotification

Method doEnableNotification

android/src/BluetoothSensor.java:118–126  ·  view source on GitHub ↗
(BluetoothGattCharacteristic c)

Source from the content-addressed store, hash-verified

116 }
117
118 private boolean doEnableNotification(BluetoothGattCharacteristic c) {
119 BluetoothGattDescriptor d = c.getDescriptor(BluetoothUuids.CLIENT_CHARACTERISTIC_CONFIGURATION);
120 if (d == null)
121 return false;
122
123 gatt.setCharacteristicNotification(c, true);
124 d.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
125 return gatt.writeDescriptor(d);
126 }
127
128 private void enableNotification(BluetoothGattCharacteristic c) {
129 synchronized(enableNotificationQueue) {

Callers 2

enableNotificationMethod · 0.95
onDescriptorWriteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected