Home > Enterprise >  How to put mutli observables in one observable in RxJava?
How to put mutli observables in one observable in RxJava?

Time:09-09

I have mutli obserables of type Observable I want to put them all in one Obseravble and observe this one only.

CodePudding user response:

If you want each Observable to be done and then going to the next Observable (In Sequence) then you can use:

Obserable.concat(Obseravble<T>, Obserable<T>, Obserable<T>)

If you don't care about their sequence you can use:

Obserable.merge(Obseravble<T>, Obserable<T>, Obserable<T>)

Note: You can observe them both in the normal way.

  • Related