title: How to call a method in activity from a service
body: <p>There is a service that listens for some voice. If voice matches a string a certain method is invoked in the service object. </p>
  
  <pre><code>public class SpeechActivationService extends Service {
  
       public static Intent makeStartServiceIntent(Context pContext){    
  
           return new Intent(pContext, SpeechActivationService.class);
       }
  
       //...
  
       public void onMatch(){
           Log.d(TAG, "voice matches word");
       }
  
       //...
  }
  </code></pre>
  
  <p>This is how I start the service in my activity:</p>
  
  <pre><code>Intent i = SpeechActivationService.makeStartServiceIntent(this);
  startService(i);
  </code></pre>
  
  <p>From this service method, how can I invoke a method that resides in the activity object? I don't want access from activity to service, but from service to activity. I already read about handlers and broadcasters but could not find/understand any example. Any ideas?</p>