How to execute two observables sequentially?
android, rx-java
Solution
This is what concat operator does - it executes sequentially given Observables - another Observable won't start until previous one gets completed
Observable.concat(dataBaseObservable, networkRequestObservable)
.subscribe(Data -> {
// do something with data
});
Problem
How to execute two observables sequentially and overwrite one result by another in rxjava chain? For example i have got data1 = observableFromDb and data2 = observableFromServer; I would like to combine them in chain and overwrite data1 by data2 result.