mBassador Eventbus not working

mBassador Eventbus not working

Hello,

I am having troubles to get my Eventbus mBassador working. It is working well with Android and RoboVM and it is part of my very vital Base classes we are using on both platforms. Unfortunately it isn't woking with MOE (yet). Maybe you can help me and figure out whats wrong.

I have attachad a small example .

Look at the AppViewController

1. I am instanting a Bus (static)

2. I am creating a new MyTest object (static)

3. I am registering the mytest object

4. in Myobject I have the listener with @Handler annotation

5. I am posting a message which should be picked up by the listener but no luck.

Any help would be greatly appreciated.

Thanks a lot Sven

AttachmentSize
Downloadapplication/zip Testmbassador.zip139.9 KB
4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hello,

just wanted to know if someone is looking into this issue. I need to finalize the migration and come to a conclusion. I will continue to work on the project tomorrow and if I know that no one is taking care from your side I will rather develop a workaround.

Thanks and kind regards
Sven

Are your add proguard for event bus?

Try to add this to proguard.cfg file:

-keepattributes *Annotation*
-keepclassmembers class ** {
    @org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }

# Only required if you use AsyncExecutor
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
    <init>(java.lang.Throwable);
}

 

Updated: I am not read carefully for mbassador try this https://github.com/bennidi/mbassador/issues/102

 

Thanks. I will try tomorrow.

Leave a Comment

Please sign in to add a comment. Not a member? Join today