-
Notifications
You must be signed in to change notification settings - Fork 582
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
Indications are not supported. #14
Comments
This is true, the library does not handle indications yet. You are welcome to open a pull request :) |
How much testing do you want to see? It looks like |
If you'd use same code don't duplicate tests. Just test what is new. Also I'd review the pull request itself for any bugs. |
With Paweł we will think how to handle situations where user would set a notification after setting indication to the same characteristic. Edge case - never the less needs to be addressed somehow. With your current proposal first setter would win and the second one would end up using the first one. |
@dariuszseweryn that is correct, and the reason that I haven't made a PR yet. |
What about adding an When user would want to set a notification after setting indication to the same characteristic and overwrite is |
This is exactly what i'm needing. Your hack works great @mzgreen. Is the overwrite parameter really needed? It seems like an overwrite could always happen and leave it up to the developer to check if a notification/indication is already set to the same characteristic. |
@cbodin Actually my idea with |
We will go with emitting an exception when the indication is being set after notification was already setup (or vice-versa). We are discussing the best API still though. The code should be available within this week. |
Emitting exception directly when subscribing or throwing an exception when the setupNotification method is called? |
The |
Added support for the indications with commit: https://github.com/Polidea/RxAndroidBle/commit/f69ce78b18f635d23efc9b71e06c3e6e7d87d1c9. |
Summary
There doesn't appear to be a way to set up indication callbacks without first enabling notifications and then updating the descriptor. The particular device that I am interacting with doesn't appear to handle that well, leading to sporadic timeouts. A
setupIndication(UUID characteristic)
method would be helpful to have in addition tosetupNoticication()
See my hack.
The text was updated successfully, but these errors were encountered: