I have a method that creates an observable from list of strings.
public Observable makeUrls() {
List<String> urls = new ArrayList<>();
return Observable.from(urls)
.flatMap(url -> upload(url));
}
Now I want to return method b after all values in the list is emitted.
public Observable b(List<String> strings){
return Observable.from(strings)
..some other work here...;
}
The expected code i need is something like this:
public Observable makeUrls() {
List<String> urls = new ArrayList<>();
return Observable.from(urls)
.flatMap(url -> upload(url))
// This part is what i can't figure out how to write...
// I want to call this after all items are emitted but I can't return Observable
.doOnCompleted(()->b(strings));
}