I am a big fan of open source contributions made for the Android community and have been studying their latest contribution Otto (event bus)
http://square.imtqy.com/otto/
Digging deeper, I see that Otto uses reflection, and there is no ordered broadcast (a template in which an unprocessed message is transmitted from one receiver to the next receiver, listening to the same event). Otto believes in more fire and forget the model.
Now the android has a LocalBroadcastManager (LBM) in its v4 support library, which performs the same task, although it is more cumbersome and has more restrictions on the objects being transferred. But on the brighter side, he maintains orderly broadcasting and is more like a normal broadcast.
Both Otto and LBM are in the same process space, so in terms of speed, I assume that both will be the same. The only real difference that I could see is that Otto allows you to define custom events, and you don't need to serialize / Parcel Objects.
Therefore, my real question is: when do you use Otto if LBM does the same.
References:
http://nick.perfectedz.com/otto-event-system/
Use intent or event bus to communicate in one application
https://plus.google.com/107049228697365395345/posts/6j4ANWngCUY
android android-intent otto
Chris Apr 04 '14 at 19:11 2014-04-04 19:11
source share