Before we move further, let's add the required libraries to your project. If you're using Android Studio, just add the following dependencies to the module build.gradle
script:
dependencies { … compile 'io.reactivex:rxandroid:1.1.0' compile 'io.reactivex:rxjava:1.1.0' }
rxjava
is a library that implements the Reactive Extensions (http://reactivex.io/) on Java , and rxandroid
is a library that adds classes to help write reactive components with RxJava
in Android applications.