[英]How to implement network calling , when the user is in another call and his call is not disturbed
我们正在 Agora SDK 中实现网络呼叫功能。 我们可以呼叫对方,但现在呼叫与已经存在的网络呼叫合并。 那么我们如何避免这种情况。 如果 Agora SDK android 有可能,请帮助。
我做了一个和你类似的网络通话功能,目前我使用TelephonyManager
来检测当前手机通话的 state:
TelephonyManager telephonyManager =
(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
if(telephonyManager.getCallState() == TelephonyManager.CALL_STATE_IDLE){
//proceed to initiate network call feature of AgoraSDK
} else {
//Do nothing, or notify the other caller that the user is busy via API or Push.
}
请注意,这仅检测通过移动网络的呼叫,它不会检测其他类型的呼叫,例如通过 Whatsapp、Viber 或 Skype 呼叫。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.