If the BLE device exposes a characteristic with notification capabilities, our application can subscribe to adequately handle them. Basically, you simply need to state notifications from those characteristics are enabled using the following code:
FSubscribed := SelectedDevice.SetCharacteristicNotification(FCharacteristic, True);
Please note, SelectedDevice is a TBluetoothLEDevice instance you already connected to and explored services/characteristics of. FCharacteristic must be a valid reference to a TBluetoothGattCharacteristic instance of the selected device.
When the notification is received, the characteristic is read again and the OnCharacteristicRead event will be fired consequently, allowing you to properly react in your application code.
BLE is really on the rise for modern application development and the Delphi cross-platform support is very convenient as it enables writing applications in a wide range of use cases, especially...