I am trying to create a previous push notification stack with a new one or replace it on the taskbar for Android.
I am not sure how to do this, since the push notification sends back both data objects and notifications, and from what I understand, the notification is sent directly to the system tray. If so, how can I stop the notification independently. Some users will receive 5-10 notifications, and this will continue.
EDIT:
I tried collapse_key, but it still does not replace previous notifications with the same key ... Am I doing it wrong somehow here?
method: 'POST', uri: 'https://gcm-http.googleapis.com/gcm/send', headers: { 'Content-Type': 'application/json', 'Authorization': authorize //GOOGLE API KEY }, body: JSON.stringify({ "registration_ids": [otherUserResult.reg_id], "collapse_key": "follow", "data": { "notifyToUserId": to, "notifyFromId": from, "notifyMsg": msg, "notifyItemPicture": itemPic, "notifyItemName": itemName, "notifyFromName": fromName, "notifyType": type, "dateNotified": dateNotified }, "notification": { "title": fromName, "body": notifyMsg, "icon" : "ic_pushnotify" }, "priority": "high", "content_available": true
source share