Android的API来检查,如果通话的过程中,或在保持 [英] Android API to check if call is Active or On Hold
本文介绍了Android的API来检查,如果通话的过程中,或在保持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一个API函数来检查呼叫是否处于活动状态,或者已被搁置?
Is there an API function to check if a call is currently Active, or if has been put on Hold?
假设我有两个连接的电话,有没有办法来检查,如果每个人是活动的,在保持,或者他们被连接在一个电话会议?
Assuming I have two connected calls, is there a way to check if each one is active, on-hold, or maybe they are connected in a conference call?
推荐答案
是的,你可以检查一个通话的过程中通过设备或不:
Yes, you can check if a call is active over device or not:
public static boolean isCallActive(Context context){
AudioManager manager = (AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
if(manager.getMode()==AudioManager.MODE_IN_CALL){
return true;
}
else{
return false;
}
}
这篇关于Android的API来检查,如果通话的过程中,或在保持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文