I'm trying to tidy up my code a bit, and Single seems to be a good choice for me, because I am doing something that will only ever emit one result.
I had a problem, although earlier I used flatMapIterable to answer (list) and did something on each item. I do not see how I can achieve this with Single.
getListOfItems() .flatMapIterable(items -> items) .flatMap(item -> doSomethingWithItem()) .toList()
This works fine if getListOfItems returns an Observable , but if I try to return it Single , then I cannot make flatMapIterable and see no alternative, any ideas?
android rx-android rx-java2
spO_oks
source share