-
Notifications
You must be signed in to change notification settings - Fork 23
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
Inside Services post / postRemote only post local #9
Comments
Looks like, post / postRemote work only on the UI Thread, so assign a handler in onCreate of the Service (this is executed on the UI Thread) and then post Runnables with postRemote to it. |
Thanks for explanation. |
Well, I don’t know theoretically you could build a workaround inside Wearbus.
|
Should not postRemote only post to remote? I have a case where it posts local, is this not a bug? |
It should but as you said it does not always work
|
postRemote is not guaranteed as it uses Messaging API (to speed up event propagation) instead of Data API but doesn't guarantees delivery (if for example watch loses connection, or is out of range). |
If it runs outside your Main Context it will go crazy. Check my issue in that
|
Im doing a postRemote within an onEvent and it seems that its treating my postRemote as already posting thus in postRemote "(!postingState.isPosting)", isPosting is "true", thus skipping it. So recursive posts is not possible, or? |
Code works in Activities, but inside a service both
post
orpostRemote
only post to the local event listeners.The text was updated successfully, but these errors were encountered: