How does it work on Android in communication between activity and fragments?
Michał Sokołowski

The RxBus is a singleton instance so you can just listen and publish events from both your Fragments and/or Activities. For example, FragmentOne could listen for EventOne type events. MainActivity can then publish EventOne events to the bus and FragmentOne will receive these events. MainActivity may also listen for EventTwo and FragmentOne could publish these events so that they are picked up by MainActivity.

Hope that helps. Happy to provide an example if you need some further details.

Thanks. Dai.

Show your support

Clapping shows how much you appreciated Dai’s story.