| | |
| | | import android.content.Intent; |
| | | import android.graphics.Bitmap; |
| | | import android.os.Bundle; |
| | | import android.text.TextUtils; |
| | | import android.util.Log; |
| | | import android.view.View; |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.hdl.hdllinphonesdk.HDLLinphoneKit; |
| | | import com.hdl.hdllinphonesdk.activity.HDLLinphoneIntercomActivity; |
| | | import com.hdl.hdllinphonesdk.activity.HDLLinphoneMonitorActivity; |
| | | import com.hdl.hdllinphonesdk.callback.OnHDLLinphoneCallListener; |
| | | //import com.hdl.hdllinphonesdk.core.EasyLinphone; |
| | | import com.hdl.hdllinphonesdk.core.service.HDLLinphoneService; |
| | | import com.hdl.hdllinphonesdk.utils.HDLLog; |
| | | |
| | | import org.linphone.core.Address; |
| | | import org.linphone.core.Call; |
| | | import org.linphone.core.CallParams; |
| | | import org.linphone.core.Core; |
| | | import org.linphone.core.ProxyConfig; |
| | | |
| | |
| | | // HDLLinphoneKit.getInstance().setAccountAndLogin("5555", "85521566", "test-gz.hdlcontrol.com:5060"); |
| | | // HDLLinphoneKit.getInstance().setAccountAndLogin("6666", "85521566", "test-gz.hdlcontrol.com:5060"); |
| | | |
| | | HDLLinphoneKit.getInstance().setAccountAndLogin("7777", "85521566", "test-gz.hdlcontrol.com:5060"); |
| | | // |
| | | HDLLinphoneKit.getInstance().setAccountAndLogin("7777", "85521566", "test-gz.hdlcontrol.com:35060"); |
| | | |
| | | |
| | | |
| | | |
| | | // |
| | | // HDLLinphoneKit.getInstance().setAccountAndLogin("8888", "85521566", "test-gz.hdlcontrol.com:5060"); |
| | | // |
| | | // HDLLinphoneKit.getInstance().setAccountAndLogin("4444", "85521566", "test-gz.hdlcontrol.com:5060"); |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | clearProxyConfig(); |
| | | HDLLinphoneKit.getInstance().setAccountAndLogin("5555", "85521566", "test-gz.hdlcontrol.com:5060"); |
| | | HDLLinphoneKit.getInstance().setAccountAndLogin("5555", "85521566", "test-gz.hdlcontrol.com:35060"); |
| | | } |
| | | }); |
| | | |
| | |
| | | mTextView3.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | logout(); |
| | | HDLLinphoneKit.getInstance().getCore().enableVideoCapture(false);//禁用手机摄像头视频采集 |
| | | // //1.启用PCMA 8000 |
| | | // PayloadType[] ptList = HDLLinphoneKit.getInstance().getCore().getAudioPayloadTypes(); |
| | | // for (PayloadType pt : ptList) { |
| | | //// HDLLog.i("payloadaudio", pt.getMimeType()); |
| | | // if ((pt.getMimeType().equals("PCMA") || pt.getMimeType().equals("PCMU")) && pt.getClockRate() == 8000) { |
| | | //// pt.enable(true); |
| | | // HDLLog.i("payloadaudio true", pt.getMimeType() + ": "+ pt.getClockRate()+"HZ " + pt.enabled()); |
| | | // } else { |
| | | //// pt.enable(false); |
| | | // HDLLog.i("payloadaudio false", pt.getMimeType() + ": "+ pt.getClockRate()+"HZ "+ pt.enabled()); |
| | | // } |
| | | // } |
| | | // logout(); |
| | | } |
| | | }); |
| | | |
| | |
| | | |
| | | @Override |
| | | public void onUnlockAction() { |
| | | // |
| | | HDLLinphoneKit.getInstance().getCore().enableVideoCapture(true);//禁用手机摄像头视频采集 |
| | | |
| | | // showToast("开锁"); |
| | | // EasyLinphone.callTo("61723164995779",true); |
| | | openSuccess = !openSuccess; |
| | | if(openSuccess){ |
| | | HDLLinphoneKit.getInstance().onOpenSuccess(); |
| | | }else{ |
| | | HDLLinphoneKit.getInstance().onOpenError("设备不在线"); |
| | | } |
| | | // openSuccess = !openSuccess; |
| | | // if(openSuccess){ |
| | | // HDLLinphoneKit.getInstance().onOpenSuccess(); |
| | | // }else{ |
| | | // HDLLinphoneKit.getInstance().onOpenError("设备不在线"); |
| | | // } |
| | | |
| | | |
| | | } |