简体   繁体   English

Callkit来电ui

[英]Callkit incoming call ui

I am using call kit framework for calling and please help me 我正在使用呼叫工具包框架进行呼叫,请帮助我
how to remove call kit ui when incoming call occurs during app in foreground and call in process, i am getting call kit ui in background. 如何在应用程序前台和呼叫过程中发生来电时删除呼叫工具包ui,我将在后台获得呼叫工具包ui。

You can check for app state before reporting a new incoming call to CXProvider . 您可以在报告对CXProvider的新来电之前检查应用状态。 If you do not wish to use system incoming call screen when your app is in foreground, then give the if statement not to report new incoming call screen if the app is in foreground. 如果您不希望在应用程序处于前台时使用系统来电屏幕,那么if应用程序位于前台,则给if语句不报告新的来电屏幕。

Example: 例:

let state = UIApplication.shared.applicationState

if state == .background {
    // background
    provider.reportNewIncomingCall(with: UUID(uuidString: call.callUUID)!, update: callUpdate) { error in /* */ }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM