I created simple activity with infinity progres bar, and I\'am trying to run time consuming method using RxJava to prevent UI thread from blocking, but everytime UI thread is bl
According to docs
Deprecated: fromFunc0 Unnecessary now that Func0 extends Callable. Just call fromCallable(java.util.concurrent.Callable) instead.
So you could make the call in this way:
Observable.fromCallable(new Callable() { @Override public Object call() throws Exception { return someMethod(); } }).subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()).subscribe(new Action1() { @Override public void call(Object object) { } });