iOS 4:通话期间是否可以显示本地通知?
我想要一个应用程序在后台运行并侦听指示已启动电话呼叫的事件(通过使用 CTCallCenter)。根据这些数据,我想注册指示通话持续时间的本地通知。是否可以:
A:在后台监听电话事件?如何防止应用程序被暂停(Apple 文档规定,应用程序暂停时不会收到事件)
B:在此日期注册本地通知并在通话期间显示这些通知(或者框架是否在通话期间限制本地通知?我找不到任何相关信息)
非常感谢您的帮助。
I want an app run in the background and listen to the events that indicate initiated Telephony Calls (by using CTCallCenter). Upon this data, I want to register Local Notifications that indicate call duration. Is it possible to:
A: Listen to Telephony events in the background? How to keep the app from being suspended (Apple documentation states that events are not received while app is suspended)
B: Register Local Notifications upon this date and SHOW these notification DURING a call (or does the framework restrict Local Notifications during phone calls? I can't find any info on this)
Help would be very much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答:有点...如果您有活动的后台任务,您可以获得呼叫状态事件。坏消息是后台任务只会持续 10 分钟。因此,10 分钟后,您将不会再收到任何呼叫状态。
B:是的,通话时本地通知确实有效。我已经做到了并且效果很好。
A: kind of... you can get call state events IF you have a background task active. The bad news is that the background task will only last 10 min's. So after the 10 min's you don't get any more call states.
B: Yes local notifications do work while on a call. I've done it and it works just fine.