Subscribing to Notifications from the Gatt Server

suggest change

You can request to be notified from the Gatt Server when the value of a characteristic has been changed:

gatt.setCharacteristicNotification(characteristic, true);
BluetoothGattDescriptor descriptor = characteristic.getDescriptor(

All notifications from the server will be received in the onCharacteristicChanged method of your BluetoothGattCallback:

public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
super.onCharacteristicChanged(gatt, characteristic);
byte[] newValue = characteristic.getValue();

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents