问题描述
我需要确定来电来电的时间。我知道applicationWillTerminate将被调用,如果用户接受调用和applicationWillResignActive当弹出的确认消息的呼叫出现,但是:
-applicationWillTerminate也被调用时,用户请求或电池退出即将失效
-applicationWillResignActive在显示UIViewAlert时也会被调用。
I need to determine when an incoming phone call arrives. I know that applicationWillTerminate will be called if the user takes the call and applicationWillResignActive when the popup with the confirmation message for the call appears, however:
-applicationWillTerminate is also called when the app exits by user request or battery is about to die
-applicationWillResignActive is also called when a UIViewAlert is shown.
感谢
推荐答案
简而言之,您无法确定应用程序中是否有来电或其他类型的中断。
In short - no, you can not determine if there's an incoming call or another kind of interruption in your application.
这篇关于检测来电的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!