【发布时间】:2014-02-07 04:59:17
【问题描述】:
Navitahttps://itunes.apple.com/us/app/navita-t.e.m.-personal/id590228620?mt=8怎么样 设法显示通话记录?
如果我将应用程序从任务管理器中滑出,然后它会错过呼叫,这表明它可能正在使用 CTCallCenter 的 callEventHandler 并且正在通过保存时间/持续时间来创建自己的呼叫日志以响应 callEventHandler 回调。
但是,如果是这种情况,那么它是如何在后台做到这一点的呢?我的印象是 callEventHandler 只能被前台应用使用,不能在后台使用?
该应用正在使用定位服务,但即使在禁用此功能后,它仍然能够获取有关呼叫的信息(前提是该应用未暂停)。我虽然它可能正在使用后台位置更新来保持自己准备好接收 callEventHandler 回调,但显然不是。
Navita 应用还可以显示通话时间和通话时长。
赏金将授予包含足够、准确和详细信息的答案,使我能够模拟 Navita 应用程序的行为,特别是我必须能够编写一个可以获取电话时间和持续时间的应用程序在应用不在前台、设备的位置服务关闭以及应用在后台超过使用 beginBackgroundTaskWithExpirationHandler 授予的约 3 分钟后发生的调用:
Here is what I observe with the Navita app that I want to be able to reproduce:
1) Run app
2) Task away from app
3) Go to device settings, privacy, and turn off Location Services.
4) Go to device settings, privacy, background app refresh and turn off for the app
5) Wait > 10 minutes to make sure the app is not still in the background as a consequence of using beginBackgroundTaskWithExpirationHandler:
6) Call the device from another phone, answer the phone call, then hang up.
7) Launch the app again and display the call time and duration
(这是iOS7且未越狱)
【问题讨论】:
标签: ios core-telephony