有没有办法从我的应用程序设置徽章值而不是从服务器获取它?
我正在设备上处理推送通知。
有没有办法从我的应用程序设置徽章值而不是从服务器获取它?
我指的是应用程序处于后台时的情况(并且系统弹出警报对话框)。我没有将徽章值存储在服务器上,而是存储在我的应用程序本地。
谢谢
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技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有发现这样的可能性。很奇怪的是苹果没有提供如此明显的机制。使用您自己的网络服务器自动标记是设置适当标记值的一种可能方法。因此,我不会通过推送通知发送该值。
唯一的方法是在应用程序激活时设置它。
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.