@@ -0,0 +1,912 @@
+package es.craftsmanship.toledo.katangapp.utils;%0A%0Aimport android.os.Handler;%0Aimport android.os.Looper;%0A%0Aimport com.squareup.otto.Bus;%0A%0A/**%0A * @author Javier Gamarra%0A */%0Apublic class AndroidBus %7B%0A%0A    private static final Bus BUS = new MainThreadBus();%0A%0A    private AndroidBus() %7B%0A    %7D%0A%0A    public static Bus getInstance() %7B%0A        return BUS;%0A    %7D%0A%0A    public static class MainThreadBus extends Bus %7B%0A        private final Handler handler = new Handler(Looper.getMainLooper());%0A%0A        @Override%0A        public void post(final Object event) %7B%0A            if (Looper.myLooper() == Looper.getMainLooper()) %7B%0A                super.post(event);%0A            %7D else %7B%0A                handler.post(new Runnable() %7B%0A                    @Override%0A                    public void run() %7B%0A                        MainThreadBus.super.post(event);%0A                    %7D%0A                %7D);%0A            %7D%0A        %7D%0A    %7D%0A%7D

add generic class to post messages to main thread