title: Ionic FCM notification tap on background not receiving data
body: <p>I am using <a href="https://ionicframework.com/docs/native/fcm/" rel="noreferrer">Ionic FCM</a> and <a href="https://github.com/brozot/Laravel-FCM" rel="noreferrer">Laravel FCm package</a> to send notifications to the app.</p>
  
  <p>The token gets stored in the Database, The notification is received in the app too. The problem is when the app is in background and notification is tapped the specific page isn't opening.</p>
  
  <p>The code for handling notification tapped is taken from the Ionic docs:</p>
  
  <pre><code>console.log('This will print in all cases');
  this.fcm.onNotification().subscribe(data =&gt; {
    console.log('this will will print when app in background', data);
  
    if (data.wasTapped) {
      console.log('This never gets printed', data);
      console.log("Received in background");
      this.nav.setRoot(CommunicationPage, { 'message_id': data.page_id });
    } else {
      console.log('Data: this will will print when app in background', data);
      this.nav.push(CommunicationPage, { 'message_id': data.page_id });
      console.log("Received in foreground");
    };
  });
  </code></pre>