title: The FCM message data is not received in the ionic application
body: <p>I have a simple Ionic implementation (Android) to receive message from FCM.
  When a message is sent from the Firebase console, the notification arrives and an alert is displayed but the message data is not displayed.  </p>
  
  <p>This is the code (app.component.ts):</p>
  
  <pre><code>  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, public fcm: FCM, private alertCtrl: AlertController) {
  
  this.fcm.subscribeToTopic('all');
  
  platform.ready().then(() =&gt; {
    this.fcm.getToken().then(token =&gt; {
  
      console.log(token);
  
      let alert = this.alertCtrl.create({
        title: '¡New token!',
        message: token,
        buttons: [
          {
            text: 'Cancel',
            role: 'cancel',
            handler: () =&gt; {
              console.log('Cancel');
            }
          },
          {
            text: 'OK',
            handler: () =&gt; {
              console.log('OK');
              this.navCtrl.push('DetailPage');
            }
          }
        ]
      });
    alert.present();
  
    });
  
    this.fcm.onNotification().subscribe(data =&gt; {
      alert('message received');
      if(data.wasTapped) {
        console.log(data);
       console.info("Received in background");
      } else {
      //  console.log(data);
       console.info("Received in foreground");
      }; 
    });
  </code></pre>
  
  <p>For example, when the message is sent from the Firebase console:</p>
  
  <ul>
  <li>Message Text: This is a test!</li>
  <li>Optional label: New message.</li>
  </ul>
  
  <p>the alert('message received') in the application is displayed, but the output of the console.log(data) into the fcm.onNotification().subscribe() is:</p>
  
  <pre><code>&gt; {wasTapped: false}
  {"wasTapped": false}
  </code></pre>
  
  <p>How can I get the message data? Any idea?
  Thanks.</p>