iPhone - 如何收到通话完成通知

发布于 2024-09-04 10:26:52 字数 368 浏览 0 评论 0原文

我正在开发一个应用程序,需要对已完成的电话采取行动,最好是在通话结束后立即采取行动,但每天至少一次。

我已经阅读了新的 CoreTelphony 框架,如果我的应用程序处于活动状态,我似乎可以获取呼叫事件,但如果我的应用程序不是前台应用程序,我不知道如何在呼叫结束时启动/唤醒我的应用程序。我也不明白任何新的伪后台“模式”如何允许我的应用程序在后台监听这些事件。你们中有人知道如何做到这一点吗?

如果无法进行呼叫后处理,那么我想找到一种方法每天自动唤醒我的应用程序一次,提取自上次唤醒以来的所有呼叫事件,并处理它们。我知道如何使用推送或本地通知来做到这一点,但我的理解是,这些需要用户操作才能继续;在这种情况下,我只想自动进行处理。有没有一种机制可以实现这一点?

谢谢, 担

I'm developing an application that needs to take action on completed phone calls, preferably right after the call ends but minimally once per day.

I've read up on the new CoreTelphony framework, and it seems I can get call events if my app is active, but I don't see how to launch/wake my app when a call ends if my app is not the foreground app. I also don't see how any of the new pseudo-background "modes" would allow my app to listen for these events in the background. Do any of you know how this might be done?

If post-call processing isn't possible, then I'd like to figure out a way to automatically wake my app up once per day, pull all of the call events since the last wakeup, and process them. I know how I might do this with Push or Local notifications, but my understanding is that those require user action to continue; in this case, I just want the processing to happen automatically. Is there a mechanism that would enable this?

Thanks,
Dan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

属性 2024-09-11 10:26:53

如果没有用户交互,您无法启动应用程序。
推送/本地通知不适用于此类事情,它们是为了让用户了解事件。

在未越狱的设备上,无法执行您想做的操作。

You can't launch your app without user interaction.
Push / Local notifications aren't for this kind of thing, they're for letting the user know about event.

On a non-jailbroken device there is no way to do what you want to do.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文