Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need Notification Callback #85

Open
java4ever opened this issue Nov 22, 2023 · 2 comments
Open

Need Notification Callback #85

java4ever opened this issue Nov 22, 2023 · 2 comments

Comments

@java4ever
Copy link

Hello, thank you for providing the library. I'd like to ask how to receive a callback indicating a successful subscription when initiating a GATT notification subscription. Currently, it seems that there is no callback to the caller when writing to the NOTIFICATION_DESCRIPTOR.

@juliankotrba
Copy link

juliankotrba commented May 8, 2024

@java4ever I was also wondering about this. In the code there exists the suspending method enableIndicationsOrNotifications but since it is private and called in the flows onStart callback I am not sure if there is a way to wait for setting up indicate/notify.

Would be great if could let me know if I am missing something here.

In another issue I saw that @philips77 is currently working on a refactoring of this library. In case we are not missing something, could this also be addressed in the upcoming version?

@philips77
Copy link
Member

My plan is to enable notifications/indications automatically when notifications(): Flow<..> is called. It could be closed with an error if they failed to be enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants