I am having a few issues with the android lifecycle and Eventbus. https://github.com/greenrobot/EventBus
Currently, I am registering the activity to the bus in the onCreate lifecycle callback.
I am also unregistering it at the onStop callback. And then I am registering it on the onRestart.
When I hit the home button from my application, and then relaunch the application, it logs that onRestart is being called. However, after this, when I try to do something it gives me:
01-24 05:23:44.504: D/Event(3134): No subscribers registered for event class com.garrrila.iconolist.events.IconSelectorEvent.
How is this happening?
My onRestart code:
@Override
public void onRestart(){
Log.d(TAG, "onRestart called.");
super.onRestart();
EventBus.getDefault().register(this);
}
EDIT****
I am an idiot it turns out.
Didn't call super before unregistering or registering and did it after on accident.