Demonstrates some basic operators in RxJava.
Create an Observable from scratch by calling observer methods programmatically.
Transform the items emitted by an Observables by applying a function to each item.
Transform the items emitted by an Observable into Observables, then flatten the emissions.
Emit only those items from an Observable that pass a predicate test.
Combine the emissions of multiple Observables together via a specified function and emit single items for each combination based on the results of this function.
Apply a function to each item emitted by an Observable, sequentially, and emit the final value.
Those above images are all credited to ReactiveX and the complete list of all operators can be found at ReactiveX Operators.
TODO: It would be updated with as many operators as possible.
When developing Android apps, you generally use observeOn() to send background work's result to Android main UI thread.
That is the reason why you need RxAndroid to provide a Scheduler that schedules on the main thread or any given Looper.
It converts UI events into Observables so that these events are handled in a much more simple, consistent and concise way.
RxJava is awesome to develop Android apps as we have seen so far.
It, however, has a major drawback that is the potential of memory leaks caused by incomplete subscriptions.
It eventually causes Out Of Memory error in your Android app.
To deal with this problem, thanks to developers in Trello, we have RxLifecycle library to limit the lifespan of an Observable.