I use the green robot event bus in Android
I fire all events using EventBus.getDefault (). post and onStop I call EventBus.getDefault (). unregister (this); in my work. However, as soon as I click and reopen the application, several onEvent () are accepted on one event message. Has anyone else encountered this problem?
@Override
protected void onStart() {
super.onStart();
getBus().register(this);
}
@Override
protected void onPause() {
getBus().unregister(this);
super.onPause();
}
@Override
protected void onStop() {
getBus().unregister(this);
super.onStop();
}
protected EventBus getBus() {
return EventBus.getDefault();
}
source
share