HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java
@@ -163,7 +163,10 @@ @Override public void outgoingInit() { super.outgoingInit(); <<<<<<< HEAD Log.d("HDLLinphoneKit","------outgoingInit------"); ======= >>>>>>> 1697a5c0a1d40e756738d1f99d496c6e33b3fd52 } @Override @@ -177,9 +180,12 @@ @Override public void callEnd() { super.callEnd(); <<<<<<< HEAD Log.d("HDLLinphoneKit","------callEnd------"); // context.sendBroadcast(new Intent(HDLLinphoneIntercomActivity.RECEIVE_FINISH_VIDEO_ACTIVITY)); ======= >>>>>>> 1697a5c0a1d40e756738d1f99d496c6e33b3fd52 } }); } @@ -452,6 +458,12 @@ if (addressToCall != null) { call = core.inviteAddressWithParams(addressToCall, params); // 设置外放 for (AudioDevice audioDevice : HDLLinphoneService.getCore().getAudioDevices()) { if (audioDevice.getType() == AudioDevice.Type.Speaker) { call.setOutputAudioDevice(audioDevice); } } } } return call; @@ -570,6 +582,8 @@ return; } } currentCall.setSpeakerVolumeGain(1.0f); currentCall.setSpeakerMuted(speakerOn); } catch (Exception e) { e.printStackTrace(); } HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/activity/HDLLinphoneIntercomActivity.java
@@ -139,6 +139,9 @@ timer_lp_calltime = (Chronometer) findViewById(R.id.timer_lp_calltime); tv_lp_calltime = findViewById(R.id.tv_lp_calltime); setWidthHeightWithRatio(ll_video_lp_rendering, 16, 9); iv_lp_screenshot.setEnabled(false); iv_lp_unlock.setEnabled(false); } /** @@ -210,7 +213,6 @@ @Override public void onTick(long millisUntilFinished) { if (!HDLLinphoneIntercomActivity.this.isFinishing()) { } } @@ -219,12 +221,9 @@ */ @Override public void onFinish() { // showToast("开锁onFinish"); iv_lp_unlock.setEnabled(true); } }; // } @Override @@ -310,6 +309,9 @@ if (HDLLinphoneKit.getInstance().getOnHDLLinphoneCallListener() != null) { HDLLinphoneKit.getInstance().getOnHDLLinphoneCallListener().onAnswerAction(); } iv_lp_screenshot.setEnabled(true); iv_lp_unlock.setEnabled(true); } /****************开锁成功********/ HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/activity/HDLLinphoneMonitorActivity.java
@@ -32,7 +32,7 @@ import org.linphone.core.CoreListenerStub; /** *监视页面 * 监视页面 */ public class HDLLinphoneMonitorActivity extends LPCheckPermissionsActivity implements View.OnClickListener { private static final String TAG = "HDLLinphoneMonitorActivity"; @@ -90,7 +90,7 @@ onDestroyLinphone(); HDLLog.i(TAG,"onDestroy"); HDLLog.i(TAG, "onDestroy"); } @@ -110,17 +110,17 @@ video_lp_rendering = findViewById(R.id.video_lp_rendering); video_lp_rendering2 = findViewById(R.id.video_lp_rendering2); setWidthHeightWithRatio(ll_video_lp_rendering,16,9); setWidthHeightWithRatio(ll_video_lp_rendering, 16, 9); } /** * initData */ private void initData(){ private void initData() { Bundle extras = getIntent().getExtras(); if(extras != null){ String titleName = extras.getString(HDLLinphoneKit.KEY_TITLE_NAME); if(!TextUtils.isEmpty(titleName)){ if (extras != null) { String titleName = extras.getString(HDLLinphoneKit.KEY_TITLE_NAME); if (!TextUtils.isEmpty(titleName)) { tv_lp_title.setText(titleName); } } @@ -160,7 +160,7 @@ /** * 初始化开门回调事件 */ void initCallBack(){ void initCallBack() { HDLLinphoneKit.getInstance().setOpenOpenDoorCallBack(new OnLPOpenDoorCallBack() { @Override public void onOpenSuccess() { @@ -177,9 +177,9 @@ /** * 初始化开锁屏蔽倒计时 */ void initCountDownTimer(){ void initCountDownTimer() { mCountDownTimer = new CountDownTimer(10*1000, 1000) { mCountDownTimer = new CountDownTimer(10 * 1000, 1000) { @Override public void onTick(long millisUntilFinished) { if (!HDLLinphoneMonitorActivity.this.isFinishing()) { @@ -219,11 +219,11 @@ private void onClickScreenshot() { // Bitmap img = HDLImageUtils.createViewBitmap(video_lp_rendering); Bitmap img = video_lp_rendering.getBitmap(); boolean isSuccess = HDLImageUtils.saveImageToGallery(this, img); boolean isSuccess = HDLImageUtils.saveImageToGallery(this, img); if(isSuccess){ if (isSuccess) { showToast(getString(R.string.lp_saveToTheAlbumsStr)); }else { } else { showToast(getString(R.string.lp_operationFailedStr)); } } @@ -257,6 +257,7 @@ iv_lp_unlock.setEnabled(false); startOpenDoorCountdown(); } /** * 开启倒计时 */ @@ -317,13 +318,12 @@ core.addListener(mCoreListener); core.enableMic(false);//关闭麦克风 } } /** * onDestroyLinphone */ void onDestroyLinphone(){ void onDestroyLinphone() { Core core = HDLLinphoneKit.getInstance().getCore(); if (core != null) { core.removeListener(mCoreListener); HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/activity/HDLLinphoneReverseCallActivity.java
@@ -58,7 +58,7 @@ private TextView tv_lp_calltime; //参数 private boolean isAnswer;//是否已经接听了 private boolean isAnswer = false;//是否已经接听了 private int callTime;//通话时间 //倒计时 private CountDownTimer mCountDownTimer; @@ -113,7 +113,6 @@ HDLLog.i(TAG, "onDestroy"); } /** * initView */ @@ -133,6 +132,9 @@ timer_lp_calltime = (Chronometer) findViewById(R.id.timer_lp_calltime); tv_lp_calltime = findViewById(R.id.tv_lp_calltime); setWidthHeightWithRatio(ll_video_lp_rendering, 16, 9); iv_lp_screenshot.setEnabled(false); iv_lp_unlock.setEnabled(false); } /** @@ -205,7 +207,6 @@ @Override public void onTick(long millisUntilFinished) { if (!HDLLinphoneReverseCallActivity.this.isFinishing()) { } } @@ -309,6 +310,9 @@ if (HDLLinphoneKit.getInstance().getOnHDLLinphoneCallListener() != null) { HDLLinphoneKit.getInstance().getOnHDLLinphoneCallListener().onAnswerAction(); } iv_lp_screenshot.setEnabled(true); iv_lp_unlock.setEnabled(true); } /****************开锁成功********/ @@ -343,7 +347,6 @@ int temp1 = Integer.parseInt(timer_lp_calltime.getText().toString().split(":")[1]); return temp0 * 60 + temp1; } /****************封装常用方法********/ /** @@ -415,7 +418,6 @@ video_lp_rendering2 = null; } /** * 初始化震动器 */ @@ -441,8 +443,8 @@ /** * 关闭震动器 */ void cancelVibrator(){ if(mVibrator != null){ void cancelVibrator() { if (mVibrator != null) { mVibrator.cancel(); mVibrator = null; } HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/res/layout/activity_hdllinphone_intercom.xml
@@ -21,14 +21,10 @@ android:gravity="center" android:text="室内机" android:textColor="@color/lpsdk_textColor" android:textSize="18sp"></TextView> android:textSize="18sp"/> </RelativeLayout> <!-- <org.linphone.mediastream.video.display.GL2JNIView--> <!-- android:id="@+id/video_rendering"--> <!-- android:layout_width="match_parent"--> <!-- android:layout_height="match_parent"/>--> <LinearLayout android:id="@+id/ll_video_lp_rendering" android:layout_width="wrap_content" HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/res/layout/activity_hdllinphone_monitor.xml
@@ -77,8 +77,7 @@ android:layout_height="66dp" android:scaleType="fitCenter" android:background="@drawable/btn_click_lp_screenshot" android:layout_centerHorizontal="true" ></ImageView> android:layout_centerHorizontal="true"/> <TextView android:id="@+id/tv_lp_screenshot" android:layout_width="match_parent" @@ -87,8 +86,7 @@ android:gravity="center" android:textColor="@color/lpsdk_textColor" android:textSize="14sp" android:layout_alignParentBottom="true" ></TextView> android:layout_alignParentBottom="true"/> </RelativeLayout> HDLLinphoneSDKDemoNew/app/src/main/java/com/example/hdllinphonesdkdemo/LinphoneTestActivity.java
@@ -15,8 +15,15 @@ public class LinphoneTestActivity extends Activity { <<<<<<< HEAD private static final String password = "c3jPOxdmD0bkNuo930eY9eYBD"; private static final String serverIP = "47.96.88.250:25060"; ======= // "A583853817423247", // "763548", private static final String password = "763548"; private static final String serverIP = "139.159.157.75:46000";//""116.62.26.215:35060"; >>>>>>> 1697a5c0a1d40e756738d1f99d496c6e33b3fd52 private String account = ""; // 登录 HDLLinphoneSDKDemoNew/app/src/main/res/layout/activity_linphone_test.xml
@@ -27,9 +27,13 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" <<<<<<< HEAD android:inputType="number" android:text="1539852889620406274" /> ======= android:text="A583853817423247" /> >>>>>>> 1697a5c0a1d40e756738d1f99d496c6e33b3fd52 <Button android:id="@+id/login_btn"