title: How to open a specific activity when the app is running in background?
body: <p>I need to open a specific activity when the app is running in background (not killed) using <code>Firebase</code> notification system. As per the doc, Notification tray will open the default activity and send the intent to it.</p>
  <p>To open a specific activity, I added an  <code>&lt;Intent&gt;</code> to <code>Manifest</code> file:</p>
  <pre><code> &lt;intent-filter&gt;
          &lt;action android:name=&quot;OPEN_ACTIVITY_1&quot; /&gt;
          &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;
  &lt;/intent-filter&gt;
  </code></pre>
  <p>Sending data through <code>Postman</code> as a <code>Post</code> request:</p>
  <pre><code>{ 
    &quot;notification&quot; : {
        &quot;OPEN_ACTIVITY_1&quot;:&quot;.activity.TemActivity_&quot;,
        &quot;body&quot; : &quot;update !&quot;
     }, 
    &quot;data&quot;: {
        &quot;type&quot;:0,
        &quot;question&quot;:&quot;open the activity&quot;
   },
   &quot;to&quot;: &quot;dDmXZa9k6-o:APA91bEx91oyYnOyzK3kX839EqbvA2CgY74s-
  fLUs8MCYZzVmnp-RpgyI3zicEFVS37K7A4kPpbbqYU9hMBEbs-
  PrBXlSTYTOBVd7O3CNvl1vaTEbGIHjLLRTWvEK2VRCvJkhQTXWtr3&quot;
  }
  </code></pre>
  <p>However, I am getting the notificaiton and when I am clicking the <code>notificaiton</code> tray. It's always opening the default intent activity. What Am I doing wrong here to open the <code>TeamActivity_</code> (Using android annotation)</p>
  <h1>Edit-1</h1>
  <pre><code>public class MessagingService extends FirebaseMessagingService {
  
  public String TAG = &quot;Data&quot;;
  
  @Override
  public void onMessageReceived(RemoteMessage remoteMessage) {
      System.out.println(&quot;data&quot;);
    }
  }
  </code></pre>
  <p>My <code>token</code> is valid because I can see the notification tray.</p>