title: Ionic Firebase get data after notification Tap
body: <p>Using the FCM plugin <a href="https://ionicframework.com/docs/native/fcm/" rel="nofollow noreferrer">here</a> I am getting the notifications using firebase.</p>
  
  <pre><code> let ready=await this.platform.ready();
      this.fcm.onNotification().subscribe((data)=&gt;{
        alertdata);
           },(error)=&gt;{console.log(`error ${error}`);
      });
  </code></pre>
  
  <p>The notifications arrive when the app is not running and are also handled properly when the app is running.</p>
  
  <p>But tapping the notification when the app is closed just opens the app.</p>
  
  <p>I want to know how can I code the functionality that when the notification is tapped custom action is taken bases on the payload received.</p>