Events taken multiple times - Greenrobot eventbus

I use Greenrobot EventBus in my application and it works great.

However, if I press the back button to close the application, restart the application immediately, I seem to receive this event twice. If I do this again, I will get it three times, etc.

I check the logs and debugging to see if I have multiple instances of any classes or if I register several times, but I do not see any additional classes, and using isRegistered returns false.

Any ideas?

thank

+4
source share
3 answers

/ ? . register() Activity.onResume(), unregister() Activity.onPause().

. , .

+9

, - : EventBus , ; , EventBus , , ( ). , register(), unregister(), onEvent() ( onPause() onResume()).

+2

, , , . , bus.register , ; - , .

0
source

All Articles