In my application I'm adding Fragments dynamically to the container in main activity view. I would like to know what is the best way to pass data when using Otto when we add Fragment. Currently this is how I'm doing it, please in example I'm not posting my CustomObject
Inside My Main Activity
getSupportFragmentManager().beginTransaction()
.add(R.id.fragment_container, MY_CUSTOM_FRAGMENT).commit();
BusProvider.getInstance().post(produceCustomString());
Inside My Fragment
@Subscribe
public void onCustomStringChanged(String customString) {
}