Open paulgavrikov opened 9 years ago
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. I think this is EventBus issue/topic so If you feel the same please close issue as it is not directly BusWear related.
Well, I don’t know theoretically you could build a workaround inside Wearbus. But anyway I’d suggest you to write this down somewhere, nearly drove crazy to find out why it wasn’t working ;-)
On 10 Jun 2015, at 23:11, Michal Tajchert notifications@github.com wrote:
I think this is EventBus issue/topic so If you feel the same please close issue as it is not directly BusWear related.
— Reply to this email directly or view it on GitHub https://github.com/tajchert/BusWear/issues/9#issuecomment-110915698.
Should not postRemote only post to remote? I have a case where it posts local, is this not a bug? Update: This problem was the same as "paulgavrikov" had.
It should but as you said it does not always work
Am 26 Aug 2015 um 23:53 schrieb powder366 notifications@github.com:
Should not postRemote only post to remote? I have a case where it posts local...
— Reply to this email directly or view it on GitHub.
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
Am 27 Aug 2015 um 00:01 schrieb powder366 notifications@github.com:
Yes, but why does it end up local?
— Reply to this email directly or view it on GitHub.
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.