finds.dev← search

// the find

amitshekhariitbhu/RxJava2-Android-Samples

★ 4,906 · Java · Apache-2.0 · updated Jan 2026

RxJava 2 Android Examples - How to use RxJava 2 in Android

A set of small Android Activities, one per RxJava 2 operator or pattern (map, zip, buffer, a debounced search, a caching chain, RxBus, RecyclerView pagination), each paired with a blog post on outcomeschool.com. It is for Android developers moving from RxJava 1 or learning Rx for the first time, and it works best as a reference you open next to the operator you are unsure about.

Each example is a standalone Activity named for the operator it shows, so `ZipExampleActivity` or `SwitchMapExampleActivity` is a complete, runnable answer without tracing shared abstractions. The examples go past toy `just(1, 2, 3)` pipelines: `SearchActivity` combines debounce, switchMap and distinctUntilChanged for type-ahead, and the cache example layers memory, disk and network sources with concat and firstElement. The Subject examples cover publish, behavior, replay and async variants side by side, and the Disposable example addresses when to dispose versus clear a CompositeDisposable. Flowable, SingleObserver, CompletableObserver and compose are all present, which covers the parts of an RxJava 1 migration that tend to trip people up.

The whole project targets RxJava 2, which RxJava 3 superseded in 2019, so a repo pitched at people migrating to RxJava 2 is documenting a step most of the ecosystem has already left. The install snippet in the README is `compile 'io.reactivex.rxjava2:rxjava:X.X.X'` with the version left as a placeholder, and `compile` was removed from the Android Gradle Plugin in 7.0, so pasting it will not build as written. Each example sits inside full Activity and layout code, so the Rx part is a small slice of every file, and the only test file in the tree is the template ExampleUnitTest. The README's operator list has no error-handling operators such as onErrorReturn or retry, and the example names do not suggest those are covered either, even though error routing is where most real RxJava bugs in Android apps come from.

View on GitHub → Homepage ↗

// 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 →