RxJava/RxAndroid : Load from cache before api call using Observable.concat()
Mert Şimşek
2409

you may use ‘doOnNext’ as this:

apiSource.getRadioList()
 .subscribeOn(Schedulers.io())
 .doOnNext{radioWrapper ->

databaseSource.save(radioWrapper)
 }
.subscribeOn(Schedulers.computation())

Like what you read? Give xuzhengzhou a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.