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

Android stopNotification causes errors if done too quickly #937

Open
sam-higgs opened this issue Oct 14, 2022 · 1 comment
Open

Android stopNotification causes errors if done too quickly #937

sam-higgs opened this issue Oct 14, 2022 · 1 comment
Labels

Comments

@sam-higgs
Copy link

Upon calling .stopNotification() an error occurs when trying to do any other ble action too quickly afterwards e.g. .startNotification() or .read()

Has anyone else experienced this? Adding a delay of over 100ms seems to be a workaround.

@peitschie
Copy link
Collaborator

Hi @sam-higgs

Are you able to provide any logs with what the reported errors are?

Generally speaking, you should wait for the callbacks to complete (or await the ble.withPromises.stopNotification(...) promise) before starting another notification or reading another value.

Out of interest, what's the use-case here that's requiring you to stop and then start the notifications in quick succession?

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

No branches or pull requests

2 participants