So, I found out about Green Robots' eventbus module. Followed the instructions on this page to try to get it working: http://greenrobot.org/eventbus/documentation/how-to-get-started/
Seems simple enough.
I put in the appropriate code, but when run on device I get a crash:
org.greenrobot.eventbus.EventBusException: Subscriber class com.crowdlab.activities.LoadingActivity and its super classes have no public methods with the @Subscribe annotation.
The first few lines of my class look like this:
public class LoadingActivity extends BaseActivity implements AlertDialogButtonListener {
AlertDialog mDialog = null;
AlertDialog mPushDialog = null;
@Subscribe
public void onMessageEvent(MessageEvent event){
Toast.makeText(this, "From Loading "+event.message, Toast.LENGTH_SHORT).show();
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
EventBus.getDefault().unregister(this);
super.onStop();
}
.
.
.
It /seems/ the annotation is there. The compile happens without so much as a warning. I'm using version 3.0.0 as specified in the gradle file...
So what could be wrong? (RTFM gratefully accepted, just tell where the FM with a relevant article is.)
Thanks!
-Ken