I’ve read and watched a lot on Rx. Most examples either use the J8 lambda notations/Scala/Groovy or some other awesome language that us Android developers are constantly envious of.
Unfortunately I could never find real-world simple examples in Android that could show me how to use RxJava. To scratch that itch, I created a github repo with a couple of nifty examples using RxJava. You can build the apk and run the app to see different working examples.
If you don’t know anything about RxJava, I would strongly recommend you first get acquainted with RxJava and understand the terminology really well. It has a pretty steep learning curve, so just throw yourself at it, until you start to understand the motivation behind its usage. Here are some resources to get you started:
- Rx in 15 minutes - by Erik Meijer creator of the Reactive extensions. RxJava is essentially a Java port of Reactive extensions.
- Rx Workshop - Channel9 Microsoft’s video channel on RX. Just peruse through the first few videos. You’ll pick a lot of useful info.
- Watch this excellent talk by Ben Christensen - one of the creators of RxJava.
- An interesting writeup I found somewhere in the interwebs.
- Dan Lew started a nice primer series today, on RxJava for Android. Definitely follow his 3 part series.
- Snoop around the RxJava wiki. Look at those marble diagrams specifically. You will have to come back to them repeatedly to get a good understanding of the operators.
Once you have a decent understanding of when to use RxJava and the different terms used, come back to the learning RxJava by example repo and you’ll find the examples a godsend. If not, contribute with the examples you think that will be.