Hi all, is it possible to convert a Completable to...
# rx
o
Hi all, is it possible to convert a Completable to an Observable? I am calling
toObservable()
on my completable, but nothing is emitted in onNext. The doc of the method
Completable.toObservable()
says:
Copy code
Returns an Observable which when subscribed to subscribes to this Completable and relays the terminal events to the subscriber.
I am using something like this
Copy code
Completable.complete()
    .toObservable<Any>()
    .subscribe { }
z
A Completable doesn't emit any items, just terminal events, so when you convert to an Observable the observable will do the same. If you want to emit some value on completion, use an operator like
andThen
o
Many thanks @Zach Klippenstein (he/him) [MOD]. That’s exactly what I was looking for 👍