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

AzMoo

04/09/2018, 4:11 AM
Hi, I’m trying to use a ViewModel to chain queries to an API. eg, The first query returns an invoice with customer id’s, the second query returns the customer data related to those id’s. From what I’ve been reading I need to use a MediatorLiveData to observe LiveData objects representing the API calls, but I’m not really understanding how to chain these and only return a result, once I’ve received both responses. Does anybody have some documentation or an example to help me out here?
g

gildor

04/09/2018, 5:41 AM
3 Views