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

Threading issues and multiple object issues. #17

Open
acooley opened this issue May 4, 2020 · 0 comments
Open

Threading issues and multiple object issues. #17

acooley opened this issue May 4, 2020 · 0 comments

Comments

@acooley
Copy link

acooley commented May 4, 2020

Since you are using AlarmManager you need a singleton with proper synchronization to represent your BLE 'device'. If you don't have that you'll run in to some really strange issues, particularly on older devices, if the library is used aggressively. Basically you need to make sure that only one thread ever interacts with the Bluetooth subsystem from your app. This happens naturally if you use the app from the foreground, but as soon as you introduce background stuff you need a Kotlin object or other form of singleton and you need to synchronize on it.

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

1 participant