O'Reilly logo

Reactive Android Programming by Tadas Subonis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Resulting flow

After all the modifications we have made, the flow now became much more easy to understand:

Observable.merge(        createFinancialStockUpdateObservable(yahooService, query, env),        createTweetStockUpdateObservable(configuration,         trackingKeywords, filterQuery))        .compose(bindToLifecycle())        .subscribeOn(Schedulers.io())        .doOnError(ErrorHandler.get())        .observeOn(AndroidSchedulers.mainThread())        .doOnError(this::showToastErrorNotificationMethod)        .observeOn(Schedulers.io())        .doOnNext(this::saveStockUpdate)        .onExceptionResumeNext(StorIOFactory        .createLocalDbStockUpdateRetrievalObservable(this))        .doOnNext(update -> log(update))        .observeOn(AndroidSchedulers.mainThread())        .subscribe(stockUpdate -> {            Log.d("APP", "New update " + stockUpdate.getStockSymbol()); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required