NordicSemiconductor / Android-BLE-Library

A library that makes working with Bluetooth LE on Android a pleasure. Seriously.
BSD 3-Clause "New" or "Revised" License
1.98k stars 413 forks source link

Want to get the characteristic on which the data was received for the characteristics I have subscribed to get notified for #547

Closed xaviergspintly closed 5 months ago

xaviergspintly commented 6 months ago

I am subscribing to some characteristics using the enableNotifications() and I receive the data using a DataReceivedCallback . That works fine. However, I want to now also know on which particular characteristic object or characteristic UUID I'm getting the notification (meaning characteristic on which I'm getting the data in DataReceivedCallback). Is there something similar to DataReceivedCallback which I can use to know this?

philips77 commented 5 months ago

You may register one callback per characteristic, so you'll know it by just having different implementations.

xaviergspintly commented 5 months ago

Yeah. I kind of did the same afterwards but forgot to close this issue. Thanks.