June 2017
Intermediate to advanced
400 pages
8h 44m
English
Let's start with creating a source Observable using Observable.create(). Relatively speaking, a source Observable is an Observable where emissions originate from and is the starting point of our Observable chain.
The Observable.create() factory allows us to create an Observable by providing a lambda receiving an Observable emitter. We can call the Observable emitter's onNext() method to pass emissions (one a time) up the chain as well as onComplete() to signal completion and communicate that there will be no more items. These onNext() calls will pass these items up the chain towards the Observer, where it will print each item, as shown in the following code snippet:
import io.reactivex.Observable; public class ...
Read now
Unlock full access