RxJavaAndroidInterop
Interop library for exposing Android's main thread and loopers as RxJava 3 Schedulers directly.
Ported from https://github.com/ReactiveX/RxAndroid
dependencies {
implementation "com.github.akarnokd:rxjava3-android-interop:3.0.0-RC6"
}
Usage
import hu.akarnokd.rxjava3.android.*;
import io.reactivex.rxjava3.core.*;
Flowable.intervalRange(1, 10, 1, 1, TimeUnit.SECONDS, AndroidInteropSchedulers.mainThread())
.subscribe(System.out::println);
plugins for overrides
import hu.akarnokd.rxjava3.android.*;
AndroidInteropPlugins.setMainThreadSchedulerHandler(scheduler -> scheduler);