Tutorial by Examples

rx-java set up Gradle compile 'io.reactivex:rxjava2:rxjava:2.1.1' Maven <dependency> <groupId>io.reactivex.rxjava2</groupId> <artifactId>rxjava</artifactId> <version>2.1.1</version> </dependency> Ivy <dependency...
The following prints the message Hello, World! to console public void hello() { Observable.just("Hello, World!") // create new observable .subscribe(new Action1<String>() { // subscribe and perform action @Override public void call(String st) { Sy...
The core concepts of RxJava are its Observables and Subscribers. An Observable emits objects, while a Subscriber consumes them. Observable Observable is a class that implements the reactive design pattern. These Observables provide methods that allow consumers to subscribe to event changes. The ev...
An Observable can be thought of as just a stream of events. When you define an Observable, you have three listeners: onNext, onComplete and onError. onNext will be called every time the observable acquires a new value. onComplete will be called if the parent Observable notifies that it finished prod...

Page 1 of 1