title: GreenRobot EventBus error : No subscribers registered for event
body: <p>I am trying to post event from Activity to Service using <a href="https://github.com/greenrobot/EventBus" rel="nofollow">GreenRobot EventBus</a>.
  But when I try to post event the logcat is showing the following message :</p>
  
  <pre><code>No subscribers registered for event class com.example.dhaval.homeexamples.CallBackEvent
  No subscribers registered for event class org.greenrobot.eventbus.NoSubscriberEvent
  </code></pre>
  
  <p>Here is code which I used in Activity to post event : </p>
  
  <pre><code>EventBus.getDefault().post(new CallBackEvent(1));
  </code></pre>
  
  <p>Following is my <code>CallBackEvent</code> : </p>
  
  <pre><code>public class CallBackEvent {
    private int a;
    public CallBackEvent(int a) {
      this.a = a;
    }
  }
  </code></pre>
  
  <p>Following is my Service class having Subscriber :</p>
  
  <pre><code>public class BackService extends Service{
  
    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
      return null;
    }
  
    @Override
    public void onCreate() {
      super.onCreate();
      EventBus.getDefault().register(this);
    }
  
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
      return super.onStartCommand(intent, flags, startId);
    }
  
    @Override
    public void onDestroy() {
      super.onDestroy();
      EventBus.getDefault().unregister(this);
    }
  
    @Subscribe
    public void onEvent(CallBackEvent callBackEvent){
      Log.d("service", "CallBackEvent : called");
    }
  }
  </code></pre>
  
  <p>Why is this happening? Because when I post event from Service to Activity it is working fine. But, when I try with this code (From Service to Activity) it is not working.</p>