Skip to content

EventBus integration

Keith Petkus requested to merge eventbus into master

Created by: paidforby

This pull request integrates the EventBus library as a dependency in the Mozilla Reference Browser and provides an example of publishing a message and two options for reading the messages in different activities.

Usage

After starting the reference browser, to publish a message on the EventBus, open the "three-dot menu" and select "Make a Toast". The text content of the message will be selected at random from a list of "Cheers!" in 45 different languages. In the BrowseActivity, which is setup as a subscriber to the EventBus, the message is immediately displayed as a toast pop-up.

Additionally, after publishing a message, it can be re-read in the Settings page. Choose the "Settings" option from the three-dot menu and select "Read most recent toast." The EventBus is limited in that only the most recent sticky post is available to be read. Once the most recent toast is read (or if no toast has been made), the "Read most recent toast" option is disabled.

Edited by grant

Merge request reports