These are chat archives for ReactiveX/RxJava

28th
May 2018
Daimhim
@Daimhim
May 28 2018 01:01
How does RxJava subscribe twice
or multiple
Ignacio Baca Moreno-Torres
@ibaca
May 28 2018 05:33
What do you mean? You can subscribe as many time as you want, but the operator composition may change de subscription behavior (means when start and stop the subscription) of parents observables...
Daimhim
@Daimhim
May 28 2018 06:54
a transmitter Multiple processing ,Just like broadcast
Ignacio Baca Moreno-Torres
@ibaca
May 28 2018 06:57
:worried: sorry still not sure, but, take a look at this operators (share, publish, refCount) you can do whatever you need http://reactivex.io/documentation/operators/publish.html
or describe your case… what you are trying to do :+1:
Daimhim
@Daimhim
May 28 2018 07:00
I'm RxJava2, New I use eventbus.
My service receive message,Then send it to Activity. May be have multiple Activity.
Ignacio Baca Moreno-Torres
@ibaca
May 28 2018 07:09
yes, you can use a PublishSubject as a simple broadcast solution http://reactivex.io/documentation/subject.html
many activities can be subscribed to the subject, and when you call subject.onNext(message), the menssage is emitted to all subscribed activities
Daimhim
@Daimhim
May 28 2018 07:12
Thank you for following my question,I will try it.
Ignacio Baca Moreno-Torres
@ibaca
May 28 2018 17:43
@alexandru did you solve the “global error handler” problem? I was investigating and looks like a good place might be wrapping or writing your own CallAdapter, where you can add some fallback strategy for all created observables… but it was not so easy… I have a kind of super simple REST client library, it was focused on GWT but it works in android too, it quite simple concept, and it also quite limited, but if it fits your need it is super light weight… take a look here https://github.com/intendia-oss/autorest :wink:
Alexandru Nedelcu
@alexandru
May 28 2018 17:59
@ibaca you probably want to signal another Alexandru
Ignacio Baca Moreno-Torres
@ibaca
May 28 2018 19:05
Hehe true :sweat_smile: I want to mention @rishabh876