title: Firebase shows two notifications on Android
body: <p>I am struggling to find the cause for the duplicate notification message on android using Firebase, Unity and sending from nodejs with the help of node-gcm.</p>
  
  <p>Here is all relative code:</p>
  
  <p>Unity3d client side I got:</p>
  
  <pre><code> public class PushServiceManager : MonoBehaviour
      {
          public string Identifier;
          public string SkuId;
  
          public SQSParameters sqsOptions;
          private SQSManager sqs;
  
          // Use this for initialization
          void Start()
          {
              sqs = new SQSManager(this.sqsOptions);
              sqs.Initialize(this.gameObject);
  
              Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived;
              Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived;
          }
  
          public void OnTokenReceived(object sender, Firebase.Messaging.TokenReceivedEventArgs token)
          {
              Debug.Log("Received Registration Token: " + token.Token);
  
              RegistrationToken t = new RegistrationToken();
              t.id_token = token.Token;
  
              // sends token to node server
              sqs.SendRegistrationToken(t);
          }
  
          public void OnMessageReceived(object sender, Firebase.Messaging.MessageReceivedEventArgs e)
          {
              Debug.Log(e.Message.Data.ToString());
          }
      }
  </code></pre>
  
  <p>Nodejs server side:</p>
  
  <pre><code>pushNotification(pushRequest, tokens, callback) {
  
          // This is an array of firebase tokens
          let registrationTokens = tokens.map(function (token) {
              return token.token;
          });
  
          let message = new gcm.Message({
              timeToLive: pushRequest.ttl
          });
  
          let note = {
  
             title: 'Message title',
             icon: 'none',
             sound: 'none',
             body: 'message text'
          };
  
          message.addNotification(note);
  
          let payload = {
             data: {foo: "foo"}
          }
  
          message.addData(payload);
  
          this.sender.send(message, {registrationTokens}, callback);
      }
  </code></pre>
  
  <p>Result on device is:<br>
  <a href="https://i.stack.imgur.com/aJUt8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aJUt8.png" alt="push notifications on device"></a></p>
  
  <p><em>Question:</em><br>
  Why do I get the second empty push notification?<br>
  Tapping first one opens up a unity game as expected but tapping that empty one does not.<br>
  Where am I going wrong with this?</p>
  
  <p>Thank you!</p>
  
  <p>01.31.17 UPDATE:<br>
  Shutout to firebase support team for looking into this issue...<br>
  <a href="https://i.stack.imgur.com/3YlC0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3YlC0.png" alt="enter image description here"></a></p>