I have created one Activity (DemoActivity.java) with 2 Fragments (FragmentOne.java and FragmentTwo.java).
I registered the EventBus
in the Activity like thisEventBus.getDefault().register(this);
and created one Suscriber method in the Activity:
@Subscriber
public void abc(String str) {
Log.i(TAG,"MainActivity Called !!");
}
Then I post an event from FragmentTwo.java on button click EventBus.getDefault().post("");
This scenario works fine for me. But when I create the same subscriber method in FragmentOne.java it is not working. Why?