February 3, 2015

EventBus, my way.

One of my favorite libraries for Android recently has been EventBus. If you don't know what it is, it is simple, according to their own explanation:

EventBus is publish/subscribe event bus optimized for Android.

    • simplifies the communication between components
    • decouples event senders and receivers
    • performs well with Activities, Fragments, and background threads
    • avoids complex and error-prone dependencies and life cycle issues
    • makes your code simpler
    • is fast
    • is tiny (<50k jar)
    • is proven in practice by apps with 100,000,000+ installs
    • has advanced features like delivery threads, subscriber priorities, etc

I've been using it on my Android architecture examples and it works like a charm. The only thing I've been missing is the capability to limit the number or running events and the capability of cancelling them.

So.. I've fork it, and I'm now actively integrating that capability on the library. I'll probably make a pull request upstream to the original EventBus but I don't have any clue if it will be accepted or not.

Anyway... if you find it useful give it a look.. and who knows, give a line or two of code also!

No comments:

Post a Comment