@Override public void onClick(View v) { try { mMikeView.setEnabled(false); ECVoIPSetupManager setupManager = ECDevice.getECVoIPSetupManager(); if (setupManager != null) { setupManager.setMute(!isMikeEnable); isMikeEnable = setupManager.getMuteStatus(); } if (isMikeEnable) { initBottomStatus(0); } else { synchronized (mLock) { // new Thread(mikeAnimRunnable).start(); mLock.notify(); } } if (mCallback != null) { mCallback.onMeetingMicEnable(isMikeEnable); } mMikeView.setEnabled(true); } catch (Exception e) { e.printStackTrace(); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mCallId = getIntent().getStringExtra(ECDevice.CALLID); mCallNumber = getIntent().getStringExtra(ECDevice.CALLER); mCallName = mCallNumber; initResourceRefs(); mName.setText(mCallName); mPhone.setText(mCallNumber); mVideoTopTips.setText(getString(R.string.str_vedio_call_in, mCallName)); ECDevice.getECVoIPSetupManager().setVideoView(mVideoView, mLoaclVideoView); mLoaclVideoView.setVisibility(View.VISIBLE); }
@Override public void onInitialized() { ECInitParams params = SDKHelper.getInstance().getParams(); if (!params.validate()) { ViewInject.toast("error"); // Intent intent = new Intent(ACTION_SDK_CONNECT); // intent.putExtra("error", -1); // mContext.sendBroadcast(intent); return; } if (params.validate()) { ECDevice.login(params); } }
public void sendMessage(final Friend friend, History history) { try { ECMessage msg = ECMessage.createECMessage(ECMessage.Type.TXT); msg.setForm(UserCache.getInstance().getClientUser().getUserId() + ""); msg.setMsgTime(System.currentTimeMillis()); msg.setTo(friend.getUserId() + ""); msg.setSessionId(friend.getUserId() + ""); msg.setDirection(ECMessage.Direction.SEND); String content = history.getScene().getSceneId() + "/" + history.getTime() + "/" + history.getStatus(); ECTextMessageBody msgBody = new ECTextMessageBody(content); LogUtil.d(TAG, "The content is " + content); msg.setBody(msgBody); ECChatManager manager = ECDevice.getECChatManager(); manager.sendMessage(msg, mOnSendMessageListener); } catch (Exception e) { LogUtil.e(TAG, "send message fail , e=" + e.getMessage()); } }