Multiple push notification messages on android


#1

When sending two notifications the second one always overrides the first one in the notification center.
According to the docs this should happen only when using the tag:

“tag”: Indicates whether each notification message results in a new entry on the notification center. If not set, each request creates a new notification. If set, and a notification with the same tag is already being shown, the new notification replaces the existing one.

However this happens to me all the time, regardless whether I set a value for the tag or not.

I even tried setting a random tag & collapse_key (which as far I understand shouldn’t be related in this case, but I gave it a try). Still didn’t help.
Here’s a sample of a notification object I’m sending:

{  
   "tokens":[  
      "my-device-token"
   ],
   "profile":"my-profile-tag",
   "notification":{  
      "message":"message",
      "android":{  
         "payload":{  
            "collapse_key":9918519,
            "tag":2825928
         }
      }
   }
}

#2

“notification”: {
“title”: "data updated ",
“message”:“allow sync immediatly”,
“android”: {
“data”: {
“title”: “testing stack notification”,
“message”: “is it working”,
“image”: “www/img/icon.png”,
“vibrationPattern”: [2000, 1000, 500, 500],
“notId”: 111 //should be different every time

                    }
               }
}