https://kotlinlang.org logo
#android
Title
# android
v

Viktor Vostrikov

08/25/2018, 2:43 PM
Hello, I have a real problem. I have previously used MediatorLiveData to combine results from FCM, Room and Networking in my Repository. It worked well. However, now I want more complexity and some additional bonuses from RxJava. This is why I have decided to use RxJava this time. I can combine Room and Networking with Observable.concatArrayEager(my _observables) or merge them all, but then I can't get the latest one, which in this case what I want. However, I don't now how to do that after FCM pushes value, and how should I notify my main observable after new changes occur? No examples on this issue whatsoever. It is crucial part. I receive FCM in my BroadCastReceiver and then notified my repository's livedata, which notified my MediatorLiveData... How to do that with RxJava? Would really welcome any advice, because it is really important issue.
3
stackoverflow 8
m

Mohamed Ibrahim

08/27/2018, 12:51 AM
First of all, this channel may be is not the best place to ask about Rx. Solving your problem begins with converting FCM broadcast receiver to observable, then comping it with other resources of data. Hope this help you start learning more about Rx
3 Views