I am dealing with the problem.
I am trying to call RxJava in the sync manner, however doing that results in blocking the Main thread.
Here is my code
If you really need a function to run on the main thread and also need it to be synchronous, then you could do something like this:
If this is the main thread (Looper.myLooper() == Looper.getMainLooper()), then run func()
If not on the main thread, then you can use the combination of observeOn(AndroidSchedulers.mainThread()) with blockingGet()