EventBus library

Although there are several open source libraries that are able to deliver this kind of pattern in Android, we will base our code examples on the popular event bus library (http://greenrobot.org/eventbus/) since it offers advanced features and high performance.

The high performance library is optimized for the Android OS and it has been used by many popular applications on Google Play.

These are the advanced features delivered by the EventBus library that you should be aware of:

  • Annotation-based subscription – You can define an subscription method by annotating an Android Activity, Service, or Fragment instance method
  • Background and main thread event delivery – The subscriber could define in which thread the event will be delivered ...

Get Asynchronous Android Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.