title: BroadcastReceiver does not receive Broadcast from IntentService
body: <p>I'm trying to send a broadcast from an IntentService to the activity that started it, this is how i register the Receiver in the activity:</p>
  
  <pre><code>private BroadcastReceiver mInitializer;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      ....
      mInitializer = new InitializationReceiver();
      IntentFilter initializer = new IntentFilter();
      initializer.addAction(IntentConstants.Tasks.INITIALIZE);
      initializer.addAction(IntentConstants.Initialization.INITIALIZE_IS_FIRST_START);
      initializer.addAction("test");
      registerReceiver(mInitializer, initializer);
      ....
  }
  
  private class InitializationReceiver extends BroadcastReceiver {
      private InitializationReceiver() {
          if(D) Log.d(TAG, "Instantiated InitializationReceiver");
      }
      @Override
      public void onReceive(Context context, Intent intent) {
          if(D) Log.d(TAG, "Received broadcast, intentAction: "+intent.getAction());
          if(intent.getAction().equals(IntentConstants.Tasks.INITIALIZE)) {
              if(D) Log.d(TAG, "Received Initialize Intent");
          }
          if(intent.getAction().equals(IntentConstants.Initialization.INITIALIZE_IS_FIRST_START)) {
              if(D) Log.d(TAG, "Received First Start Intent");
          }
      }
  }
  </code></pre>
  
  <p>And this is how i send the broadcast from the IntentService:</p>
  
  <pre><code>if(D) Log.d(TAG, "Got here");
  Intent testIntent = new Intent("test");
  sendBroadcast(testIntent);
  </code></pre>
  
  <ul>
  <li>The service is created cause "Got here" gets logged, </li>
  <li>the BroadcastReceiver is initialized before the service being created and </li>
  <li>the activity is visible when the broadcast is sent.</li>
  <li>the broadcast is not received, cause "Received broadcast..." is never logged </li>
  </ul>
  
  <p>What could cause this problem?</p>