Sometimes we need to get some data before do something else, each one can be from different sources, like 2 different web services.
Retrofit 1.9 and
NewOrderis the object that we need to create from 2 data sources, both getted from an
The Retrofit service that consumes the object and creates the final Observable:
We will have 2 Observables to wait for result:
dropObservable. (can be more! just add each Observable to combineLatest`)
Address.get(...)is a function that will return an observable with the address for that LatLng.
Observable.combineLatestto combine both
dropObservableand wait for it´s results and will end in a new
Use flatMap to apply
Thanks to lukaciko. Check this question on stackoverflow.