BLE disableValueNotifications does not remove callbacks [message #1850027] |
Fri, 11 February 2022 10:59 |
Martin Zachrison Messages: 1 Registered: February 2022 |
Junior Member |
|
|
In version 5, commit 3a6b56d0043d2621139fee3bb7189ff303424ea2, the BluetoothLeGattCharacteristicImpl:disableValueNotifications is changed from characteristic.disableNotifications() to characteristic.stopNotify().
This leads to that there is no way to unregister the callbacks created with enableValueNotifications(Consumer<byte[]> callback). Further there is no way to enable previous registered notifications, only register new ones.
I need to poll a Holyiot BLE sensor which only has notification support. readValue only returns a value if notifications has been enabled. This leads to a build up of callbacks, one for each poll, since I can neither remove and recreate the callback nor re-enable a callback.
Could you please restore to commit 8fe0e1e86c713aa93dbe88d020055a501a4f2e7f or provide some other mechanism to remove callbacks?
Regards
Martin
|
|
|
Powered by
FUDForum. Page generated in 0.03244 seconds