O'Reilly logo

Reactive Android Programming by Tadas Subonis

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

Setting up the library

First of all, let's set up the library so that it can be used in the code. Again, this is a very straightforward thing to do. Just add the following lines to the app/build.gradle file:

compile 'com.trello.rxlifecycle2:rxlifecycle:2.0.1'compile 'com.trello.rxlifecycle2:rxlifecycle-android:2.0.1'compile 'com.trello.rxlifecycle2:rxlifecycle-components:2.0.1'

The first line adds support for general lifecycle management:

compile 'com.trello.rxlifecycle2:rxlifecycle:2.0.1'

It means that this library can be used not only for Android. The following line adds the necessary support for Android Platform:

compile 'com.trello.rxlifecycle2:rxlifecycle-android:2.0.1'

This line includes custom Activities for subclassing for even ...

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