I have one Completable and Observable that emits items. I have to combine them. Some kind of Observable.combineLatest but with Completable and Observable. So logic is: if Observable emit item first, when Completable is not complete, it should wait for Completable (not ignore), if Completable is complete, then items from Observable should be handled.
I tried convert Completable into Observable but that Observable does not emit onNext, so Observable.zip, Observable.combineLatest, etc does not worked.
Code that works for me:
myCompletable.andThen(myObservable).subscribe()
But I don't call completable and observable asynchronously. I just wait until completable completes.Is it possible to run Completable and Observable asynchronously and handle observable items when Complitable complites?
Observable
emits more than one item before theCompletable
completes? Do you need to keep all prior items? – Sanlok Lee