title: Callback on library android
body: <p>i'm trying to use event bus to notify events from my library to a service.
  Up until now i've been using EventBus like this:</p>
  
  <pre><code>public abstract class MLibraryClass{
  
  ....
  EventBus.getDefault().post(event);
  ...
  </code></pre>
  
  <p>}</p>
  
  <pre><code>public class MService{
  ...
  public void onEvent(Event event){
   //do stuff
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and now i've created an interface in order to use the callback. Problem is the callback has a null reference and i don't know how to instance it.</p>
  
  <p>interface:</p>
  
  <pre><code>public Interface MInterface{
      void doStuff(Event event);
  }
  </code></pre>
  
  <p>Library class:</p>
  
  <pre><code>public abstract class MLibraryClass{
  ...
  MInterface interface;
  Event event;
  ...
  public void onEvent(){
      interface.doStuff(event)
  }
  ...
  </code></pre>
  
  <p>}</p>
  
  <p>service:</p>
  
  <pre><code>public class MService implements MInterface{
  ...
  void doStuff(Event event){
      //some code
  }
  ...
  </code></pre>
  
  <p>}</p>