finds.dev← search

// the find

hehonghui/AndroidEventBus

★ 1,609 · Java · Apache-2.0 · updated Mar 2024

A lightweight eventbus library for android, simplifies communication between Activities, Fragments, Threads, Services, etc.

A pre-greenrobot-3.0 Android event bus that uses annotation-based subscription instead of naming conventions, plus a string tag system for routing events beyond just type matching. Aimed at Android developers who found greenrobot's old onEventMainThread-style naming cumbersome. Greenrobot's EventBus has long since moved to annotations itself, making this project's main differentiator largely moot.

The tag-based routing is a genuinely useful idea — dispatching to different handlers for add-user vs delete-user events with the same payload type is cleaner than creating separate wrapper classes. The test suite is thorough for its size, covering thread modes, sticky events, primitive types, and match policies. Using WeakReference for subscribers avoids a common leak vector that trips up naive event bus implementations. The codebase is small enough to read in an afternoon if you need to fork or debug it.

Dead project — last real release was 1.0.5 in 2015, the README explicitly notes it is no longer maintained (the Chinese note is commented out but the signal is clear). Greenrobot EventBus 3.x added annotation support years ago, so the original motivation for this library no longer exists. Reflection-based method scanning at registration time has a performance cost on older Android, and there's no annotation processor option to shift that work to compile time like greenrobot added. The Gradle dependency is stale and the Maven artifact is unlikely to be available on modern artifact repositories.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →