I want to use a EventBus to detect if server is send something
I register an eventBus :
App.getBus().register(this);
public static App getInstance() {
return instance;
}
public static EventBus getBus() {
return EventBus.getDefault();
}
But I don't have idea how I can detect if server is send something
I don't have idea how I can detect if server is send something
EventBus is use used to send events with in the app, it can not be used to send messages from server to client via internet. Sending message from server to client can be implemented by using FCM by google.