In my code I'm listening for events using @Subscribe
anotation:
@Subscribe
public void orderUpdate(OrderUpdateEvent event)
My problem is that this method is called multiple times (1-3 depends from run to run) for the same event object.
This is how I send this event:
busProvider.getEventBus().postOnMain(new OrderUpdateEvent();
What could be the cause of that? Do I'm missing something?
What could be the cause of that?
One possibility is that you have three instances of this class still registered on the event bus. Make sure that you unregister()
when the object should no longer receive messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With