How do Telegram and facebook messenger clean up notifications on devices?

Asked

Viewed 68 times

4

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

How does this happen?

PS: this happens even if the application is not running on mobile.

  • was bad guy.. strength of habit, nor did I realize what was in the in Portuguese.

  • I’m not a mobile developer, but I believe that apps check in the background/thread every x seconds if the message/action related to that notification has already been seen or performed, if yes, it removes...

  • @Herculmoreira: No, this doesn’t make sense, because it happens with different platforms.. android, desktop and Ios.. if you saw in one, in the others it is marked as read.

  • No problem Raphael. I reversed my vote to close

  • http://stackoverflow.com/questions/2665634/how-to-clear-a-notification-in-android

  • No.. This happens even if the app is not running.

  • Can’t send a "push" to remove the previous notification? : S

Show 2 more comments

1 answer

0

Answered.

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

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

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.