title: What Firebase-cloud-messaging Intent-filter to use for a BroadcastReceiver?
body: <p>I am trying to get the Android BroadcastReceiver to run when a Firebase Cloud message notification is received by the Android system.</p>
  
  <pre><code>public class MyBroadcastReceiver extends BroadcastReceiver {
  
  private static final String TAG = "MyBroadcastReceiver";
  
  @Override
  public void onReceive(final Context context, Intent intent) {
  
  
      Toast.makeText(context, "EVENT OCCURED", Toast.LENGTH_LONG).show();
  
     }
  }
  </code></pre>
  
  <p>It is required in the AndroidManifest to specify receiver tags as such:</p>
  
  <pre><code>    &lt;receiver
          android:name=".MyBroadcastReceiver"  android:exported="true"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.ACTION_POWER_CONNECTED"/&gt;
              &lt;action android:name="com.google.firebase.MESSAGING_EVENT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  </code></pre>
  
  <p>As you can see in the Manifest above I've added:</p>
  
  <pre><code>&lt;action android:name="android.intent.action.ACTION_POWER_CONNECTED"/&gt;
  </code></pre>
  
  <p>to make sure the BroadcastReceiver fires when I plug cable to Android device. It works fine.</p>
  
  <p>Therefore the issue lies with the:</p>
  
  <pre><code>&lt;action android:name="com.google.firebase.MESSAGING_EVENT" /&gt;
  </code></pre>
  
  <p>Is this intent-filter action not recognized by the BroadcastReceiver?
  Is there another intent-filter action for Firebase messaging the BroadcastReceiver uses?</p>