I using FragmentDialog for subscribe on events using otto library.
@Subscribe
public void onPickupRequestResponse (PassengerPickupRequestResponseEvent event){
Toast.makeText(this.getActivity().getApplicationContext(), "Event handled", Toast.LENGTH_SHORT).show();
dismiss();
}
I register FragmentDialog in OnResume event and unregister in onPause methods.
@Override
public void onResume() {
super.onResume();
App.bus.register(this);
}
@Override
public void onPause() {
super.onPause();
App.bus.unregister(this);
}
Then in activity I post event
App.bus.post(new PassengerPickupRequestResponseEvent());
But my FragmentDialog does not handle this event.