Ease Communication Between Activities, Fragments, and Services

Ease communication between Activities, Fragments, Dialogs, Services, AsyncTaks, and Life Cycles of Anything by using event bus in Android.

Event bus is an implementation of publish/subscribe pattern which is a messaging system between a subscriber and a publisher. A subscriber waits for an event to be dispatched from a publisher.

In this article I will describe how to benefit an event bus by using Greenrobot‘s EventBus library.

Table of contents
  1. What is subscribe and publish pattern
  2. EventBus in a nutshell
  3. How to add EventBus to your project
  4. How to use EventBus in 3 Steps
  5. Main features of EventBus
  6. Useful scenarios to use EventBus in your project
  7. Drawbacks of using EventBus in your project
  8. Alternatives to EventBus
  9. Conclusion(TL;DR)
  10. Example Project
example event bus project screenshot
Example EventBus Project

Continue reading Ease Communication Between Activities, Fragments, and Services