GreenRobot EventBus

Download android eBook


  • @Subscribe(threadMode = ThreadMode.POSTING) public void onEvent(EventClass event) { }


Thread ModeDescription
ThreadMode.POSTINGWill be called on the same thread that the event was posted on. This is the default mode.
ThreadMode.MAINWill be called on the main UI thread.
ThreadMode.BACKGROUNDWill be called on a background thread. If the posting thread isn't the main thread it will be used. If posted on the main thread EventBus has a single background thread that it will use.
ThreadMode.ASYNCWill be called on its own thread.

Related Examples


223 Contributors: 3
Thursday, October 27, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial:

Download eBook