I have the List of SourceObjects and I need to convert it to the List of ResultObjects.
I can fetch one object to another using method of ResultObject:
c
Using toList() waits for the source observable to complete, so if you do that on an infinite observable (like one bound to UI events and Database calls), you will never get anything in your subscribe().
The solution to that is to Use FlatMapSingle or SwitchMapSingle.
Observable> observable = noteDao.getAllNotes().flatMapSingle(list -> Observable.fromIterable(list).toList());
Now,everytime your list is updated, you can make that event behave as an observable.