title: Activity not receiving Custom Broadcast Intent from Broadcast Receiver
body: <p>I have a Broadcast Receiver (<strong>BackgroundReceiver</strong>) which listen for package removal and then broadcast the package name to an Activity (<strong>AnalyzeActivity</strong>)</p>
  
  <p><em><strong>BackgroundReceiver.java</em></strong></p>
  
  <pre><code>public static final String REMOVED_INTENT = "com.analyze.project.RemovedReceiver";
  
      public void onReceive(Context context, Intent intent) {
          String actionStr = intent.getAction();
          if (Intent.ACTION_PACKAGE_REMOVED.equals(actionStr)) {
              Uri uri = intent.getData();
              String pkg = uri != null ? uri.getSchemeSpecificPart() : null;
              Log.i("Logging Service", "Package Removed: " + pkg);
              //Toast.makeText(context, "Package Removed:" + pkg, Toast.LENGTH_SHORT).show();
  
              Intent c = new Intent();
              c.setAction(REMOVED_INTENT);
              c.putExtra("Package", pkg);
              context.sendBroadcast(c);
          }
      }
  </code></pre>
  
  <p>I dynamically register the receivers inside my <strong>AnalyzeActivity</strong> and listen for the custom Broadcast Intent from <strong>BackgroundReceiver</strong></p>
  
  <p><em><strong>AnalyzeActivity.java</em></strong></p>
  
  <pre><code>    @Override
          protected void onResume() {
              super.onResume();
              // Register Sync Recievers
              IntentFilter intentToReceiveFilter = new IntentFilter();
              intentToReceiveFilter.addAction(BackgroundReceiver.REMOVED_INTENT);
              this.registerReceiver(mIntentReceiver, intentToReceiveFilter, null, mHandler);
              mReceiversRegistered = true;
  
          }
  
      final BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
          @Override
          public void onReceive(Context context, Intent intent) {
              String Package = intent.getStringExtra("Package");
          if (intent.getAction().equals(BackgroundReceiver.REMOVED_INTENT)) {
                  Toast.makeText(context, "(A) Package Removed: " + Package, Toast.LENGTH_SHORT).show();
                  Log.i("Package Removed", "(A) Package Removed: " + Package);
              }
  
          }
      };
  </code></pre>
  
  <p>But my Activity doesn't seem to be able to receive the broadcast intents at all.</p>