问题描述
iOS14引入了紧凑的视图,这非常适合希望在整个生态系统中减少干扰的VOIP软件。
我目前正在开发一个React-Native应用程序,该应用程序使用PushKit和SIP客户端来处理IP语音。
Puskit可以完美地“触发”紧凑的UI,以提醒用户有电话呼叫,并且当应用程序处于前台时,SIP客户端的基本功能可以正常工作。
这是我的可响应PushKit的代码的片段(我正在使用此包装程序包:https://github.com/react-native-webrtc/react-native-voip-push-notification)
//This Javascript is initialized at Bootup of the React Native App.
VoipPushNotification.addEventListener('notification',(notification) => {
let sip = store.getState().sip; //Get the SIP endpoint account in Redux
if(sip.account)
{
sip.endpoint.registeraccount(sip.account,true); //Trigger the SIP client to "Register" again to ensure that it will handle the upcoming "INVITE" from the SIP server.
}
});
但是,当用户在紧凑型UI上单击“接受”时,默认UI将取代默认的UI,然后将我们的应用推入前台。
我们如何通过自己的VoIP App保持精简UI工作流程(尤其是在iPad上)? 在PushKit或CallKit SDK中有什么可以让我们告诉iOS不要强迫前台(但还要在后台运行代码以启动VOIP音频会话?)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)