有没有办法从我的应用程序设置徽章值而不是从服务器获取它?

发布于 2024-12-05 09:53:07 字数 136 浏览 0 评论 0原文

我正在设备上处理推送通知。

有没有办法从我的应用程序设置徽章值而不是从服务器获取它?

我指的是应用程序处于后台时的情况(并且系统弹出警报对话框)。我没有将徽章值存储在服务器上,而是存储在我的应用程序本地。

谢谢

I'm working with push notifications on a device.

Is there a way to set the badge value from my app instead of getting it from the server ?

I'm referring to the case when the app is in background, (and the system popups an alert dialog). I'm not storing the badge value on the server, but locally in my app.

thanks

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

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

发布评论

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

评论(1

烟─花易冷 2024-12-12 09:53:07

我没有发现这样的可能性。很奇怪的是苹果没有提供如此明显的机制。使用您自己的网络服务器自动标记是设置适当标记值的一种可能方法。因此,我不会通过推送通知发送该值。

唯一的方法是在应用程序激活时设置它。

I didn't find such possibility. It is very strange that Apple didn't provide such obvious mechanism. Autobadging using your own webserver is the one possible way to set appropriate badge value. Because of this I'm not sending that value through push-notification.

The only approach is to set it when your application becomes active.

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