注册

如何判断通话已经过来了呢?

com.zhainanbang.chatdome D/notify: send incoming call broadcaset with user : tom
11-16 16:31:55.536 25237-25287/com.zhainanbang.chatdome D/dalvikvm: GC_FOR_ALLOC freed 516K, 32% free 17862K/26164K, paused 10ms, total 10ms
11-16 16:31:55.696 25237-25287/com.zhainanbang.chatdome D/dalvikvm: GC_FOR_ALLOC freed 509K, 32% free 17864K/26164K, paused 10ms, total 11ms
11-16 16:31:55.866 25237-25287/com.zhainanbang.chatdome D/dalvikvm: GC_FOR_ALLOC freed 518K, 32% free 17857K/26164K, paused 11ms, total 12ms
11-16 16:31:55.946 25237-25310/com.zhainanbang.chatdome D/SMACK:FileDebugger: RCV from182.92.20.34:443(1124527560): disabled
11-16 16:31:55.946 25237-25310/com.zhainanbang.chatdome D/packet reader: done is false eventType = 2


1.png


 
怎么判断这个incoming呢?
已邀请:
代码有写,看下VideoCallActivity这个类。if (!isInComingCall) {// 拨打电话
            soundPool = new SoundPool(1, AudioManager.STREAM_RING, 0);
            outgoing = soundPool.load(this, R.raw.outgoing, 1);

            comingBtnContainer.setVisibility(View.INVISIBLE);
            hangupBtn.setVisibility(View.VISIBLE);
            String st = getResources().getString(R.string.Are_connected_to_each_other);
            callStateTextView.setText(st);

            handler.postDelayed(new Runnable() {
                public void run() {
                    streamID = playMakeCallSounds();
                }
            }, 300);
        } else { // 有电话进来
            voiceContronlLayout.setVisibility(View.INVISIBLE);
            localSurface.setVisibility(View.INVISIBLE);
            Uri ringUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
            audioManager.setMode(AudioManager.MODE_RINGTONE);
            audioManager.setSpeakerphoneOn(true);
            ringtone = RingtoneManager.getRingtone(this, ringUri);
            ringtone.play();

要回复问题请先登录注册