i have a singleton service class that pulls data from a server on a set schedule. as soon as the client has received the data, i trigger bus.post(new NewServerResponseEvent());
(http://square.github.io/otto/)
then in my fragments i do this:
@Override
public void onResume() {
super.onResume();
eventBus.register(this);
}
@Override
public void onPause() {
super.onPause();
eventBus.unregister(this);
}
@Subscribe
public void handleNewServerData(NewServerResponseEvent e) {
refreshView();
}
everything works very smoothly as long as i just run it while developing on my testing device. as soon as i build a release version and put that into the play store, that handleNewServerData()
function is never called.
i can't make sense out of this. what differnce does it make to run that whole thing as a release build? is there maybe stuff happening in another thread that cant post to my subscriber?
can someone point me into the right direction?
thanks in advance