The problem with the code is here:
.observeOn(AndroidSchedulers.mainThread()) .subscribeOn(AndroidSchedulers.mainThread())
You cannot subscribe to the user interface stream, as you noticed, you will get an exception:
Only the source stream that created the view hierarchy can touch its views.
What you have to do is subscribe to the I / O stream and watch the user interface stream:
.subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe ()
mmBs source share