Using the Bluetooth SIG Application Accelerator code, and it pretty well demonstrates the various bluetooth low energy concepts. However, the mentions do not say anything about the testimony, not the notifications. I know that the readings must be confirmed as opposed to notifications, and in the code I would do byte[] val = enabled ? BluetoothGattDescriptor.ENABLE_INDICATION_VALUE : BluetoothGattDescriptor.DISABLE_INDICATION_VALUE;
instead byte[] val = enabled ? BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE : BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE;
, but is there anything else I need to do? How can I tell the server that I have been instructed as necessary? Is there something I need to add to
@Override
public void onCharacteristicChanged(BluetoothGatt gatt,
BluetoothGattCharacteristic characteristic)
{
notification_id++;
Log.d("BleWrapper","notification count = " + notification_id);
getCharacteristicValue(characteristic);
mUiCallback.uiGotNotification(mBluetoothGatt, mBluetoothDevice, mBluetoothSelectedService, characteristic);
}
?
source
share