What i am trying to do ?
I have an observable(dayListener) that emits 100 - 300 items(not confirmed maybe return nothing) from server first time I subscribe to it, then it returns 1 item after 1 hour. each Item is of type UserData
What is Problem?
I want to Observe item from (dayListner) for 3 seconds and convert it to List and store it , then later on keep on observing same observable for single item UserData
My Attempt
I cannot figure out how to convert observable for 3 seconds in rxjava 2 , because I can't return two types for same observable , UserData and List , so i am unable to form solution any ideas really appreciated !! , I'm just newbie to rxjava 2
Observable
emits a single type so you can't emit both a list and a simple item. You have some workarounds like emitting lists of a single item or emit something like an Either of a list or an item – Pelocho