如何在我的应用程序中获取推送通知设置?
我正在开发一个 iPhone 应用程序,其中包含并处理自定义声音文件的苹果推送通知。当我从常规设置中设置通知声音关闭时,当应用程序未处于运行状态时,通知声音会按我的预期关闭。但是当应用程序处于运行状态时,我需要手动处理声音播放或停止。那么我如何获取通知声音相关的设置,无论是打开还是关闭? 我可以在 didReceiveRemoteNotification 中获取以下设置 方法
alert = 收到新的 UFO 信息,徽章 = 1,声音 = Alarm1.wav
如果有人有任何关于获取常规设置(例如警报声音打开或关闭)的想法,请提供帮助。
提前致谢。
I am developing an iphone application which includes and process apple push notification for the custom sound file. When I set notification sound off from the general settings, notification sound is off as i expect, when app is not in running state. But when the app is in running state then i need to handle sound play or stop manually. So how can i fetch the notification sound related settings, whether it seted on or off?
I am able to fetch following settings in didReceiveRemoteNotification
method
alert = New UFO Information received, badge = 1, sound = Alarm1.wav
If anybody have any idea about to fetch general settings like alert sound is on or off please help.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先检查您的应用程序状态并使用此代码打开推送通知设置。
适用于 iOS 5 及更高版本。
要打开 iPhone 应用程序的任何设置,请检查此链接。
http://www.makebetterthings。 com/iphone/open-settings-app-in-iphone-using-open-url-scheme/
First check your app staust and open push notification setting with this code.
For iOS 5 and later vesion.
For open any setting of iphone app check this link.
http://www.makebetterthings.com/iphone/open-settings-app-in-iphone-using-open-url-scheme/