Answer the question
In order to leave comments, you need to log in
RXJava Retrofit how to combine two requests with different response length?
Hello!
I have a task:
From the server to get the name of the camera, the id of events from this camera, the URL of the image by the event ID
For example: we can have 5 cameras, 40 events in total from different cameras and 40 images
For API calls, I use RXJava and Retrofit
My the problem is that I am trying to combine the results of two Observables. One is obtained from the camera name server, the other is the event ID, but when trying to use .zip it does not work - as I understand it due to the different length of the response of the two Observables (from the example - 5 camera names and 40 IDs)
Can I combine the Observable in a similar way Or would it be more correct to store a separate list of camera names and then use this list to get event IDs for each name?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question