title: Firebase native plugin with push notifications is not working
body: <p>I have tried to use <a href="https://ionicframework.com/docs/native/firebase/" rel="nofollow noreferrer"><strong>Firebase native plugin</strong></a> to send push notifications.But it is not working (not getting a message to the real device).Can you tell me how to do that?</p>
  
  <p><strong>app.component.ts</strong></p>
  
  <pre><code>constructor(platform: Platform, private firebase: Firebase) {
  
      platform.ready().then(() =&gt; {
          this.firebase.getToken()
              .then(token =&gt; console.log(`The token is ${token}`)) // save the token server-side and use it to push notifications to this device
              .catch(error =&gt; console.error('Error getting token', error));
  
   this.firebase.onNotificationOpen()
              .subscribe(res =&gt; {
                  if (res.tap) {
                      // background mode
                      console.log("background");
                      console.log(res);
                      alert(res);
                  } else if (!res.tap) {
                      // foreground mode
                      console.log("foreground");
                      console.log(res);
                      alert(res);
                  }
              });
  
        });
  }
  </code></pre>
  
  <p>After the above implementation, I have tried to send push notification using <code>User Segment</code> on firebase compose message console. </p>