How do telegram and facebook messenger clean notifications on devices? [closed]

4

When you receive a notification via Telegram or Facebook Messenger on multiple devices, if you read the message in one of them in others the notification is removed.

How does this happen?

PS: This happens even if the app is not running on the phone.

    
asked by anonymous 22.07.2016 / 17:56

1 answer

0

Answered.

In case of iOS you have to send the notification payload without the alert and with badge = 0, this way it will cancel the notifications.

{"aps":{"badge":0}}

But for this to work out the expiry option of the notifications payload has to be greater than 0.

    
22.07.2016 / 21:22