| | |
| | | import com.hdl.hdllinphonesdk.HDLLinphoneKit; |
| | | import com.hdl.hdllinphonesdk.activity.HDLLinphoneIntercomActivity; |
| | | import com.hdl.hdllinphonesdk.activity.HDLLinphoneMonitorActivity; |
| | | import com.hdl.hdllinphonesdk.activity.HDLLinphoneReverseCallActivity; |
| | | import com.hdl.hdllinphonesdk.callback.OnHDLLinphoneCallListener; |
| | | import com.hdl.hdllinphonesdk.core.service.HDLLinphoneService; |
| | | import com.hdl.hdllinphonesdk.utils.HDLLog; |
| | |
| | | // 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:35060"); |
| | | HDLLinphoneKit.getInstance().setAccountAndLogin("8888", "85521566", "47.96.88.250:35060"); |
| | | |
| | | |
| | | |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | clearProxyConfig(); |
| | | HDLLinphoneKit.getInstance().setAccountAndLogin("5555", "85521566", "test-gz.hdlcontrol.com:35060"); |
| | | HDLLinphoneKit.getInstance().setAccountAndLogin("8888", "85521566", "47.96.88.250:35060"); |
| | | } |
| | | }); |
| | | |
| | |
| | | // HDLLinphoneKit.getInstance().callTo("61723164995779",true); |
| | | // HDLcallTo("61723164995779",true); |
| | | // HDLLinphoneKit.getInstance().callTo("1427186301744910338",true); |
| | | HDLLinphoneKit.getInstance().callTo("5555",true); |
| | | |
| | | HDLLinphoneKit.getInstance().callTo("1456490719927488513",true); |
| | | startActivity(HDLLinphoneMonitorActivity.class); |
| | | |
| | | |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | |
| | | HDLLinphoneKit.getInstance().getCore().setNetworkReachable(true); |
| | | // HDLLinphoneKit.getInstance().getCore().setNetworkReachable(true); |
| | | // isOpen = !isOpen; |
| | | // showToast("当前设置状态:"+isOpen); |
| | | // HDLLinphoneKit.getInstance().getCore().enableVideoCapture(isOpen);//禁用手机摄像头视频采集 |
| | |
| | | } |
| | | }); |
| | | |
| | | //1.初始化SDK,并注册HDLLinphoneService |
| | | HDLLinphoneKit.getInstance().initLinphone(this); |
| | | //2.设置是否自动跳转呼叫,如果对接极光推送再弹出页面,这里要设置false |
| | | HDLLinphoneKit.getInstance().setAutoJumpCallView(true); |
| | | //3.监听呼叫和监控页面,用户操作的相关事件、接听、拒接、开锁等.... |
| | | setOnHDLLinphoneCallListener(); |
| | | } |
| | | |
| | | void all(){ |
| | | Intent intent = new Intent(this, HDLLinphoneReverseCallActivity.class); |
| | | intent. |
| | | startActivity(intent); |
| | | } |
| | | |
| | | boolean isOpen; |
| | |
| | | |
| | | } |
| | | |
| | | public void logoutLog() { |
| | | try { |
| | | Core core = HDLLinphoneService.getCore(); |
| | | ProxyConfig[] configs = core.getProxyConfigList(); |
| | | if(configs != null) { |
| | | HDLLog.E("registrationState账户length" + configs.length); |
| | | } |
| | | |
| | | for (ProxyConfig config : configs) { |
| | | HDLLog.E("registrationState账户"+config.getIdentityAddress().getUsername()); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | // public void logoutLog() { |
| | | // try { |
| | | // Core core = HDLLinphoneService.getCore(); |
| | | // ProxyConfig[] configs = core.getProxyConfigList(); |
| | | // if(configs != null) { |
| | | // HDLLog.E("registrationState账户length" + configs.length); |
| | | // } |
| | | // |
| | | // for (ProxyConfig config : configs) { |
| | | // HDLLog.E("registrationState账户"+config.getIdentityAddress().getUsername()); |
| | | // } |
| | | // |
| | | // } catch (Exception e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } |
| | | |
| | | boolean openSuccess; |
| | | void setOnHDLLinphoneCallListener(){ |
| | |
| | | @Override |
| | | public void onUnlockAction() { |
| | | // |
| | | HDLLinphoneKit.getInstance().getCore().clearAllAuthInfo(); |
| | | // HDLLinphoneKit.getInstance().getCore().clearAllAuthInfo(); |
| | | |
| | | // showToast("开锁"); |
| | | // EasyLinphone.callTo("61723164995779",true); |