在通话期间将应用程序置于前台

发布于 2024-12-23 18:24:24 字数 219 浏览 1 评论 0原文

我想在通话期间将我的应用程序带到前台。我知道我有这个 call.callState==CTCallStateConnected 但我想在呼叫状态被视为活动时运行一些命令。

因此,当检测到电话呼叫(连接状态)时,我希望我的应用程序从后台弹出并出现在前台。我只是不确定如何让应用程序在后台运行时注册 CallConnectedState(并在激活后重新打开?)

谢谢!

I wanted to bring my application to the foreground during a phone call. I know I have this
call.callState==CTCallStateConnected but I wanted to run some commands when a call state is considered active.

So when a phone call is detected (connected state), I want my application to popup from the background and appear in the foreground. I’m just not sure how to get the application to register that CallConnectedState when running in the background (and reopen once that is activated?)

Thanks!

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

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

发布评论

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

评论(2

拥抱我好吗 2024-12-30 18:24:24

我对 iOS 5 不是 100% 确定,但在 iOS 4.X 下,您当然不能不能以编程方式强制应用程序从后台返回前台。

苹果的理念是用户始终处于控制之中,无论他/她想要在前台运行的应用程序都将保留在前台。

这是 ​​另一个问题与您大致相同

I'm not 100% certain about iOS 5, but under iOS 4.X you certainly could not programatically force an app from background back into the foreground.

Apple's philosophy is that the user is in control at all times and whatever app s/he wants to be in the foreground stays in the foreground.

Here's another question that has the roughly the same question as you.

往事随风而去 2024-12-30 18:24:24

Michael 是正确的,但我只是想补充一点,这在任何 iOS 版本(包括 iOS 5)中都是不可能的。当有电话呼叫时,您根本无法强制您的应用程序进入前台。

可能有某种方法可以用越狱的手机来完成此操作,但我不知道如何做。这超出了这个问题的范围。

Michael is correct, but I just wanted to add that this is not possible in any iOS version, which includes iOS 5. You simply cannot force your app to the foreground when a phone call is active.

There may be some way to accomplish this with a jailbroken phone, but I have no idea how. That is outside the scope of this question.

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