推送通知 - 应用程序徽章图标

发布于 2024-12-25 19:10:50 字数 71 浏览 0 评论 0原文

收到推送通知后应用程序图标不显示徽章。

在设置通知打开时,徽章应用程序图标打开。

有什么想法吗?

After receiving push notification app icon not display badge.

In setting notification is on, badge app icon is on.

any idea ?

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

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

发布评论

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

评论(1

み青杉依旧 2025-01-01 19:10:50

当您推送通知时,您需要明确包含徽章。

如果您未能提供徽章,它将被清除,并且您将不会看到徽章。

您发送的消息需要如下所示,

{
    "aps":
    {
        "alert":
        {
            "action-loc-key": "Open",
            "body": "Hello, world!"
        },
        "badge": 2
    }
}

不带 "badge": 2 徽章已清除。

You need to include the badge explicitly when you are pushing a Notification.

If you fail to provide a badge it wil be cleared and you won't see a badge.

The message you send needs to look like this

{
    "aps":
    {
        "alert":
        {
            "action-loc-key": "Open",
            "body": "Hello, world!"
        },
        "badge": 2
    }
}

without the "badge": 2 the badge is cleared.

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