How do you open the in Call UI after answering a c

2020-04-14 01:02发布

I am trying to integrate callkit with my voip app. 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. I want the in call UI of CallKit to display when I press the answer key.

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

In the XCPjsua.shared()?.handleIncomingCall(); function I just connect the call.

3条回答
Fickle 薄情
2楼-- · 2020-04-14 01:39

As soon as you answer, the CallKit UI is displayed only if the phone is locked. If the phone is unlocked you will be redirected to your app, so is your responsibility to implement an ongoing call UI.

查看更多
Emotional °昔
3楼-- · 2020-04-14 01:42

It seems that the in-call screen is in the app carousel of background apps and can be switched to manually

查看更多
聊天终结者
4楼-- · 2020-04-14 01:52

CallKit provides better integration to the system and better VoIP app visibility, but they limit the use of their call screens. You must provide call UI yourself.

The main purpose of using CallKit in your VoIP app is to improve its usability when app is killed and phone is locked. 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 is also responsible to improve your integration to the system services, like handsfree bluetooth integration, car play, Siri, etc.

查看更多
登录 后发表回答