I was wondering how to remove a remote notification after is has been sent on the receivers end, if the message has been deleted by the sender. Example, if user A sends a message to user B and user A deletes the message before user B sees it on their device.
IMessage does it when you receive a text (iPhone) but open it on another device (mac pro) the iMessage push notification will be removed on the first device (iPhone).
Also, Ive noticed gmail does it, when you receive a push notification of a new email (on iPhone) but you delete it on the gmail web page (mac pro) the push notification will go away on the lock screen or notification center of my device (iPhone).
Any help will be appreciated thank you!
I guess gmail does it by using the background mode for remote notifications, and then responding to these notifications by issuing a local notification.
You can remove local notifications, but not remote notifications.
Related
I'm working on a app project that uses react-native and FCM Push Notification (rnfirebase 5.6.x).
I send a notification when the user receives some message and I need to remove that delivered notification if the user reads that message on another source (like our web app).
With the app open or in background, I can send another push with some userInfo to let me know what I need to remove.
Everything is working perfect... Except when the user kill the app. Then I have no control on the received notification...
I tried the use the tag prop on the notification data, but according with firebase, it is for Android only.
Any ideas on how to do that?
I have checked the scenario where i got the text messages notifications
on my iPhone device, i read those message from my mac iMessage application then
the notification which is there on the device notification tray are
automatically disappeared.
How does it work?
Facebook does that also.
Possibly it's done with a silent push notification that lets the app know that a specific message has been read?
If the user turned off (assuming the user accepted to receive Push Notification in the app, but went to Settings to turn it off) Push Notification in Settings for an app, does this app still receive data sent in the notification when opening the app. This app does not receive/retrieve/request data in any other way except Push Notification.
The answer is simple: No, it doesn't.
I was observing the behavior of the gmail iOS app. When I receive an email the app shows a notification. I have the app closed, it is not running.
But when I read the email on the pc, the notification disappears immediatly on the iPhone. How is it possible to reproduce this behavior in my app? How can I remotely clear the notifications?
Thanks
Whenever the Gmail server detects that the mail has been read a silent push notification with a badge number of 0 is sent to clear the badge value.
I wish that Facebook did that as well.
Google Hangout:
You have unread notifications about your hangout chat on your lockscreen.
Open your hangout app on the PC and suddenly all the messages get removed from your lockscreen/unread notifications.
How can this be achieved?
If the device is running iOS 7.0 there's a new type of remote notification that's "silent". Your app receive the notification and make some stuff without presenting something to the user. see https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS7.html#//apple_ref/doc/uid/TP40013162-SW1