Search code examples
androidbluetooth-lowenergyrxandroidble

AndroidSchedulers.mainThread stopped working in patch rxAndoidBle 1.4


Before the 1.4 update you could just write:

.observeOn(AndroidSchedulers.mainThread()) 

and import rx.android.schedulers.AndroidSchedulers; but now I can not make this work.

Is this moved / removed or does it exist another implementation now to get similar effect?


Solution

  • The library no longer relies on RxAndroid.

    Make sure that you've put compile 'io.reactivex:rxandroid:XXX' in your build.gradle, if you want to use it's classes in your code.

    It's not a good pracitse to rely on tranitive dependencies, you should declare them on your own.