O'Reilly logo

RxJava for Android App Development by K. Matt Dupree

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. An Introduction to RxJava

Sharp Learning Curve, Big Rewards

I was pretty much dragged into RxJava by my coworkers...[RxJava] was a lot like git...when I first learned git, I didn’t really learn it. I just spent three weeks being mad at it...and then something clicked and I was like ‘Oh! I get it! And this is amazing and I love it!' The same thing happened with RxJava. 

Dan Lew1

As Dan Lew, a Google Developer Expert Android Developer, points out in the preceding quotation, RxJava can be very difficult to learn. This is unfortunate because, for reasons I point out in the next chapter, RxJava can make asynchronous data handling in Android apps much cleaner and more flexible. In this chapter, I provide a basic introduction to RxJava.

If you are skeptical that RxJava is worth learning about, given its steep learning curve, skip ahead to the second section of the next chapter. In that section, I go over a situation in which RxJava provides us with advantages over traditional ways of handling asynchronous data in Android applications. Although you won’t understand exactly how the code in that section works, you will be able to see how RxJava makes quick work of tasks that can often become messy and inflexible when handled without RxJava. After seeing how much cleaner RxJava can make your Android code, hopefully you will have the motivation to return here to this introduction. 

Let’s start with the guiding example that will help us get a handle on RxJava. Imagine we are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required