Christopher Mckenzie
Christopher Mckenzie

Reputation: 275

subcribeOn() io.reactivex.Scheduler in Observable cannot be applied to rx.Scheduler

I have about 4 other .subscribeOn(Schedulers.io()) but this is the only one that doesn't work

mSearchBarString = PublishSubject.create();
    return mSearchBarString
            .subscribeOn(Schedulers.io())

The only difference is that others use

Observable<JSONObject> jsonObjectObservable = Observable.just(data);

something like this while this one uses PublishSubject.create();

Upvotes: 3

Views: 1320

Answers (1)

Christopher Mckenzie
Christopher Mckenzie

Reputation: 275

I had the wrong import for PublishSubject that was the problem

Upvotes: 1

Related Questions