推送通知:声音和徽章
我正在使用推送通知,但我有一个疑问:如果在我的脚本(服务器端)中有徽章和声音,但用户设置了声音和徽章关闭......会发生什么?
我的意思是:我需要在我的数据库中注册每个令牌的每个设置,或者我发送通知并且 iPhone 完成所有工作? :)
谢谢!
I'm working with push notifications and i have a doubt: if in my script (server-side) there are badge and sound, but the user set sounds and badges off... what happens?
I mean: i need to register in my database every setting for every token, or i send the notification and the iPhone does all the work? :)
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无需担心用户设置。用户将收到他允许的警报。因此,如果他不想听到声音,他就会将其关闭。您仍然可以发送它,他只会收到警报和/或徽章......
You don't need to worry about the user settings. The user will receive the alerts he allowed. So if he doesn't want to have the sound and he switch it off. You can still send it and he just receive the alert and or badge...
如果用户在用户设置中关闭特定通知类型,则应用程序不会收到此类通知。例如:- 假设我注册了声音和徽章通知,但我在用户设置中禁用了徽章通知,应用程序从现在开始只会接收声音通知,直到我在用户设置中启用徽章通知或再次注册更改通知。重新注册徽章通知不会启用徽章通知,因为它们在用户设置中被禁用。
If the user switches off a particular notification type in user settings, such notifications are not received by the application. For example:- lets say I registered for sound and badge notifications but I disabled the badge notifications in user settings, the application will only receive the sound notifications from now until I enable the badge notifications in user settings or register again for alter notifications too. Re-registering for badge notifications wont enable the badge notifications since they are disbled in user settings.