我已经看到了几种方法来“确保在我的应用程序启动的电话调用结束后再次显示我的应用程序”但这不是我想要的 -> 我正在寻找的是一种方法,假设我的应用程序当前正在后台运行进行网络通信并且有人给我打电话,我希望我的应用程序能够“检测电话何时结束并恢复我的网络通信”和/或“在电话结束时将我的应用程序启动/恢复到前台”。是否有任何方法来完成这样的事情以及如何完成?
最佳答案
这在 iOS 中不受支持。
If your application is active when a call event takes place, the system dispatches the event to your handler immediately. However, call events can also take place while your application is suspended. While it is suspended, your application does not receive call events. When your application resumes the active state, it receives a single call event for each call that changed state—no matter how many state changes the call experienced while your application was suspended. The single call event sent to your handler, upon your application returning to the active state, describes the call’s state at that time.
您能做的最好的事情就是在您的应用程序打开时检测电话。
关于ios - 如何在 iOS 中结束电话后恢复(或启动)我的应用程序(我的应用程序没有*未*启动电话)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16492337/