The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


Event Bus Alternatives

Earlier in the book, we covered the concept of an event bus as a way of communicating between portions of our app, focusing on one event bus implementation: greenrobot’s EventBus. Later, in the chapter on broadcast Intent objects, we briefly covered LocalBroadcastManager.

However, those are not the only event buses available for Android, and others may fit your needs better. In this chapter, we will explore these and other event bus implementations, to compare and contrast.

Prerequisites

Understanding this chapter requires that you have read the core chapters of this book, particularly the chapters on basic event bus usage, broadcast Intents, AlarmManager and the scheduled service pattern, and Notifications.

A Brief Note About the Sample Apps

The sample apps in this chapter are generally designed to run forever.

It is unlikely that you really want them to run forever, though. Hence, please uninstall each sample after experimenting with it, particularly if you are testing on hardware, such as your personal phone. Your battery will appreciate it.

Standard Intents as Event Bus

The preview of this section is out seeking fame and fortune as the Dread Pirate Roberts.

LocalBroadcastManager as Event Bus

The preview of this section is en route to Mars.

greenrobot’s EventBus 3.x

The preview of this section is in an invisible, microscopic font.

Hey, What About Otto?

The preview of this section is presently indisposed.