I am trying to get the data from local db by each content asyncrounous,but the issue is that I want to get the data by the order that I retrieve,at first the data for the first conent,than the second etc.,currently I am getting the data in wrong order every time I run the code ,how can I achieve this?
for (Content content : contents) {
scoreCardDisposable = AppManagers.getContentManager()
.getScoreCardsAndUpdate(content.getId())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(scoreCards -> {
...
});
compositeDisposable.add(scoreCardDisposable);
}