Navita TEM应用程序如何获取通话记录信息? [英] How does the Navita TEM app get call log information?

查看:115
本文介绍了Navita TEM应用程序如何获取通话记录信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Navita如何 https://itunes.apple .com / us / app / navita-tem-personal / id590228620?mt = 8
设法显示通话记录?

How does Navita https://itunes.apple.com/us/app/navita-t.e.m.-personal/id590228620?mt=8 manage to display a call log?

如果我将应用程序从任务管理器中滑出然后它会错过调用,这表明它必须使用CTCallCenter的callEventHandler,并通过保存响应callEventHandler回调的时间/持续时间来创建自己的调用日志。

If I swipe the app out of the task manager then it misses the calls, this indicates that it must presumably be using CTCallCenter's callEventHandler and is creating its own call log by saving the time/duration in response to the callEventHandler callbacks.

但是,如果是这种情况,那么它如何设法在后台执行此操作?我的印象是callEventHandler只能被前景中的应用程序使用而不能被后台使用?

However if that is the case then how does it manage to do this in the background? I was under the impression that callEventHandler can only be used by apps in the foreground and not in the background?

该应用程序正在使用位置服务,但即使在禁用它之后仍然能够获得有关呼叫的信息(假设应用程序未被暂停)。我虽然可能正在使用后台位置更新来保持自己准备接收callEventHandler回调,但显然不是。

The app is using location services, however even after disabling this it was still able to get information about the calls (provided the app isn't suspended). I though it might be using background location updates to keep itself primed to receive callEventHandler callbacks but apparently not.

Navita应用程序还能够显示通话时间和通话时间。

The Navita app is additionally able to display call time and call duration.

赏金将奖励给一个答案,其中包含足够,准确和详细的信息,使我能够模仿Navita应用程序的行为,特别是我必须能够写一个应用程序可以获取应用程序不在前台时发生的电话呼叫的时间和持续时间,同时设备的位置服务已关闭,并且应用程序在后台运行的时间超过了授予的时间超过了约3分钟使用beginBackgroundTaskWithExpirationHandler:

The bounty will be awarded to an answer which contains sufficient, accurate and detailed information that enables me to emulate the behavior of the Navita app, specifically I must be able to write an app that can obtain the time and duration of a phone call that occurred while the app was not in the foreground, while the device's location services was turned off, and after the app had been in the background longer than the ~3 minutes granted by using beginBackgroundTaskWithExpirationHandler:

   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

推荐答案

以下是我从Navita TEM反汇编中发现的内容及其资源。

Here is what I've found from Navita TEM disassembly and it's resources.

应用程序使用两种背景模式 - 位置和音频。您可以在Info.plist文件中看到它。当您启用电话呼叫时,日志应用程序还将启用警报和实时开关。当警报启用应用程序无限循环后台bg-sound.mp3文件没有声音时,它只是静音。因为它不使用像这样的黑客如何使用CTCallCenter获取呼叫事件:setCallEventHandler:应用程序暂停时发生的情况?。这与使用的位置类似,以保持应用程序在后台运行并接收电话呼叫事件。不知怎的,这并没有被AppStore拒绝。

Application uses two background modes - location and audio. You can see it in the Info.plist file. When you enable phone calls logging application will also enable "alerts" and "Real-time" switches. When "alerts" enabled application infinitely loops in background "bg-sound.mp3" file which has no sound, it's just silence. Because of that it doesn't use hacks like this one How to get a call event using CTCallCenter:setCallEventHandler: that occurred while the app was suspended? . It's similar trick to location used in order to keep the app running in background and receive phone call events. Somehow this was not rejected from the AppStore.

这篇关于Navita TEM应用程序如何获取通话记录信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆