Rebuilding our application with RxJava

To get a feel for RxJava, let's rewrite the previously written temperature sensing application with RxJava. To use the library in the application, let's add the following dependency to the build.gradle file:

compile('io.reactivex:rxjava:1.3.8')

Here, we are using the same value class to represent the current temperature, as shown in the following code:

final class Temperature {
private final double value;
// constructor & getter
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.175.253