I'm new with rxjava
.
implementation "io.reactivex.rxjava2:rxjava:2.2.8"
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
I'm working with interval()
,
I don't know how to show View in onComplete()
of rxjava without block UI Thread.
Or call onComplete()
from onNext()
in below codes :
Observable
.interval(0, 5, TimeUnit.SECONDS)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(aLong -> {
Log.d("", "onNext()");
}, Throwable::printStackTrace, () -> {
Log.d("", "onComplete()");
Log.d("", "SHOW POP UP");
showView();
});
People who know,
Please tell me,
Thank you,