有没有办法在推送徽章更新的同时保留以前的消息?

发布于 2024-08-10 08:27:43 字数 224 浏览 4 评论 0原文

因此,想象一下这种情况:

10.00:您的应用程序推送消息“Hello”

10.01:您的应用程序推送徽章更新,但同一设备上没有消息

发生的情况是消息消失了。因此,如果用户没有看到它,它就消失了。有没有办法在不清除任何以前的消息的情况下发送徽章通知?我知道您可以再次发送该消息,但我不想向可能已经准备好该消息的用户发送垃圾邮件。

我不想讨论为什么,只是如果可能的话?

So imagine this scenario:

10.00: your app pushes a message "Hello"

10.01: your app pushes a badge update with no message out the same device

What happens is that the message dissappears. So if the user didn't see it, it's gone. Is there a way to send a badge notification without clearing any previous messages? I know you can send the message again, but I don't want to spam users who may have already ready the message.

I don't want to have a discussion about the why, simply if it's possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

濫情▎り 2024-08-17 08:27:43

不幸的是,这是不可能的。我们建议将徽章更新包含在提醒中,以便同时进行设置,但无法更新徽章而不“覆盖”提醒。

但与此同时,来自任何其他应用程序的任何消息也将覆盖您之前的警报。

如果您在 APNS 负载中包含声音,手机将播放声音或振动,因此如果您最终需要这样做,您至少可以向用户提供已收到消息的反馈。

Unfortunately, it is not possible. We recommend including badge updates with your alerts, to set it at the same time, but there's no way to just update the badge without "overwriting" the alert.

At the same time, however, any message from any other application will also overwrite your earlier alert.

If you include a sound in your APNS payload, the phone will either play the sound or vibrate, so you could at least give the user feedback that a message has been received if you end up needing to do this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文