从通知中心中删除远程通知 [英] Remove remote notification from Notification Center

查看:203
本文介绍了从通知中心中删除远程通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一些应用程序,特别是StackExchange应用和Facebook能够从通知中心通知删除/锁屏,如果你在其他地方查看通知。例如,如果我从堆栈交流的收件箱通知,然后查看我的收件箱我的笔记本电脑的通知,我的电话几乎立即消失。原本我以为这是一些刚苹果可以使用邮件和Facebook做的。

Some apps, specifically the StackExchange app and facebook are able to remove notifications from the Notification Center/Lockscreen if you view the notification elsewhere. For example if I get an inbox notification from stack exchange and then view my inbox on my laptop the notification disappears almost immediately from my phone. Originally I thought this was something just Apple could do with Mail and Facebook.

如何StackExchange发送通知到手机删除现有的通知?

How does StackExchange send a notification to the phone to remove an existing notification?

推荐答案

我觉得他们做的是发送通知以'0'徽章数清除通知中心所有现有的。我注意到的Gmail应用程序相同的行为,所以我做了一些关于它的小型研究:

I think that what they do is to send a notification with a badge number of '0' to clear all the existing ones from the notification center. I have noticed the same behavior on the Gmail app, so I did some small research about it:


  • 当我发送一封电子邮件,我收到我的手机上推送通知。然后我打开从我的笔记本电脑的浏览器,电子邮件,以及马上通知中心是明确的。

  • When I send one email, I receive a push notification on my phone. Then I open that email from my laptop's browser, and straight away the notification center is clear.

当我发两封电子邮件,我收到两个推送通知。然后,当我打开我的笔记本电脑是第一个,通知中仍保留在我的iPhone 。我打开第二封电子邮件(仍然在我的笔记本电脑)后通知中心被清除。

When I send two emails, I receive two push notifications. Then, when I open the first one on my laptop, both notifications still remain on my iPhone. After I open the second email (still on my laptop) the notification center gets cleared.

我做了与Wireshark的一些额外的检查,我认为每一个我在我的笔记本电脑打开电子邮件时,谷歌发送推送通知到我的手机(即使有仍然在我的收件箱未读邮件)。

I did some extra checks with Wireshark and I think that every time that I open an email on my laptop, Google sends a push notification to my phone (even if there are still unread messages in my inbox).

在上述所有情况下,Gmail应用是的不可以运行(但是我不知道如果背景取指在iOS 7中引入可以使事情变得复杂)。

In all the above cases, the gmail app was not running (however I'm not sure if the background fetch introduced on iOS 7 can complicate things).

我希望帮助!

这篇关于从通知中心中删除远程通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆