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

Entire merge block

The final block to produce the StockUpdate items will be this:

Observable.merge(        settings.getMonitoredSymbols()                .switchMap(symbols -> {                    String query = createQuery(symbols);                    String env =                                                              "store://datatables.org/alltableswithkeys";                    return createFinancialStockUpdateObservable                    (yahooService, query, env);                }),        settings.getMonitoredKeywords()                .switchMap(keywords -> {                            if (keywords.isEmpty()) {                                return Observable.never();                            }                            String[] trackingKeywords =                             keywords.toArray(new String[0]);                               final FilterQuery filterQuery                                = new FilterQuery()                                    .track(trackingKeywords)                                    .language("en");return createTweetStockUpdateObservable                            (configuration, trackingKeywords,                             filterQuery);                        }                ))

Again, we can extract these blocks to simplify the flow and make ...

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