简体   繁体   English

使用 callkit 接听电话后如何打开 in Call UI

[英]How do you open the in Call UI after answering a call with callkit

I am trying to integrate callkit with my voip app.我正在尝试将 callkit 与我的 voip 应用程序集成。 At this point the CallKit displays an incoming call but as soon as I press the answer key it just goes back to my app's display homescreen.此时,CallKit 会显示一个来电,但只要我按下接听键,它就会返回到我的应用程序的显示主屏幕。 I want the in call UI of CallKit to display when I press the answer key.我希望在按下接听键时显示 CallKit 的通话界面。

func provider( _ provider: CXProvider, perform action: CXAnswerCallAction) {
    XCPjsua.shared()?.handleIncomingCall();
//    confifureAudioSession()
    action.fulfill()
}

In the XCPjsua.shared()?.handleIncomingCall();XCPjsua.shared()?.handleIncomingCall(); function I just connect the call.功能我只是接通电话。

CallKit provides better integration to the system and better VoIP app visibility, but they limit the use of their call screens. CallKit提供了更好的系统集成和更好的 VoIP 应用程序可见性,但它们限制了呼叫屏幕的使用。 You must provide call UI yourself.您必须自己提供呼叫 UI。

The main purpose of using CallKit in your VoIP app is to improve its usability when app is killed and phone is locked.在您的 VoIP 应用程序中使用CallKit的主要目的是在应用程序被CallKit和电话被锁定时提高其可用性。 By using CallKit , system elevates the shared audio session of your VoIP app as the top priority, in order to improve the user experience.通过使用CallKit ,系统将您的 VoIP 应用程序的共享音频会话提升为首要任务,以改善用户体验。 CallKit is also responsible to improve your integration to the system services, like handsfree bluetooth integration, car play, Siri, etc. CallKit还负责改进您与系统服务的集成,例如免提蓝牙集成、车载播放、Siri 等。

As soon as you answer, the CallKit UI is displayed only if the phone is locked.一旦您接听,CallKit UI 仅在电话锁定时显示。 If the phone is unlocked you will be redirected to your app, so is your responsibility to implement an ongoing call UI.如果手机解锁,您将被重定向到您的应用程序,因此您有责任实施持续通话 UI。

通话画面好像在后台应用的轮播里,可以手动切换

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

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