Simple BusProvider.getInstance().post() bring exception not main thread.
How to send event from Service to Activity with Otto event bus?
Best implementation custom bus class for me
public class AndroidBus extends Bus {
private final Handler mainThread = new Handler(Looper.getMainLooper());
@Override
public void post(final Object event) {
if (Looper.myLooper() == Looper.getMainLooper()) {
super.post(event);
} else {
mainThread.post(() -> AndroidBus.super.post(event));
}
}
}