title: Service binding using intent filter
body: <p>I'm having trouble binding my activity to my service application using intent filters.</p>
  
  <p>Here is a snippet from what I have to connect to my service application:</p>
  
  <pre><code>// The connection to the service.
  private ServiceConnection connection = new ServiceConnection()
  {
      // When the messenger gets bound to the service.
      public void onServiceConnected(ComponentName className, IBinder binder)
      {
          Log.e(TAG, "Attached");
          messenger = new Messenger(binder);
      }
  
      // When the messenger gets unbound from the service.
      public void onServiceDisconnected(ComponentName className)
      {
          messenger = null;
      }
  };
  
  // Bind the service connection with the service application.
  private void createServiceBinding()
  {
      Log.e(TAG, "binding service.");
      activity.bindService(new Intent(this.activity, TestService.class), this.connection, Context.BIND_AUTO_CREATE);
      this.isBound = true;
  }
  </code></pre>
  
  <p>This works just find. I am able to send and receive Messages using a Messenger. However, I need to be able to call activity.bindService with the intent filter of my service application rather than TestService.class.</p>
  
  <p>How do I bind the activity to the service application using intent filter (e.g. com.example.testapplication.TestService rather than TestService.class)?</p>
  
  <p>Thanks in advance!</p>