2022-06-28 | 562935844@qq.com | ![]() |
2022-06-28 | 562935844@qq.com | ![]() |
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java
@@ -144,6 +144,7 @@ @Override public void incomingCall(Call linphoneCall) { super.incomingCall(linphoneCall); Log.d("HDLLinphoneKit","------incomingCall------"); if (linphoneCall != null) { String callUsername = linphoneCall.getRemoteAddress().getUsername(); HDLLog.I("来电号码:" + callUsername); @@ -162,18 +163,29 @@ @Override public void outgoingInit() { super.outgoingInit(); <<<<<<< HEAD Log.d("HDLLinphoneKit","------outgoingInit------"); ======= >>>>>>> 1697a5c0a1d40e756738d1f99d496c6e33b3fd52 } @Override public void callConnected() { super.callConnected(); // 视频通话默认免提,语音通话默认非免提 Log.d("HDLLinphoneKit","------callConnected------"); toggleSpeaker(true); } @Override public void callEnd() { super.callEnd(); <<<<<<< HEAD Log.d("HDLLinphoneKit","------callEnd------"); // context.sendBroadcast(new Intent(HDLLinphoneIntercomActivity.RECEIVE_FINISH_VIDEO_ACTIVITY)); ======= >>>>>>> 1697a5c0a1d40e756738d1f99d496c6e33b3fd52 } }); } @@ -480,8 +492,11 @@ Call currentCall = HDLLinphoneService.getCore().getCurrentCall(); CallParams params = HDLLinphoneService.getCore().createCallParams(currentCall); params.enableVideo(true); params.enableLowBandwidth(false); params.setAudioBandwidthLimit(0); // disable limitation currentCall.acceptWithParams(params); Log.d("HDLLinphoneKit","---acceptCall= "); } catch (Exception e) { e.printStackTrace(); } @@ -544,7 +559,7 @@ * 设置外放设备 */ private void routeAudioToSpeakerHelper(boolean speakerOn) { org.linphone.core.tools.Log.w("[Audio Manager] Routing audio to " + (speakerOn ? "speaker" : "earpiece")); Log.d("HDLLinphoneKit","设置外放设备[Audio Manager] Routing audio to " + (speakerOn ? "speaker" : "earpiece")); try { if (HDLLinphoneService.getCore() == null) return; if (HDLLinphoneService.getCore().getCallsNb() == 0) return; @@ -553,8 +568,14 @@ if (currentCall == null) return; for (AudioDevice audioDevice : HDLLinphoneService.getCore().getAudioDevices()) { Log.d("HDLLinphoneKit","audioDevice.getType()= " + audioDevice.getType()); } for (AudioDevice audioDevice : HDLLinphoneService.getCore().getAudioDevices()) { Log.d("HDLLinphoneKit","设置外放设备speakerOn=" + speakerOn + " audioDevice.getType()=" + audioDevice.getType()); if (speakerOn && audioDevice.getType() == AudioDevice.Type.Speaker) { currentCall.setOutputAudioDevice(audioDevice); Log.d("HDLLinphoneKit","AudioDevice.Type.Speaker"); return; } else if (!speakerOn && audioDevice.getType() == AudioDevice.Type.Earpiece) { currentCall.setOutputAudioDevice(audioDevice); HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/activity/LPCheckPermissionsActivity.java
@@ -37,6 +37,7 @@ Manifest.permission.ACCESS_NETWORK_STATE, Manifest.permission.WAKE_LOCK, Manifest.permission.RECORD_AUDIO, Manifest.permission.MODIFY_AUDIO_SETTINGS, Manifest.permission.CAMERA, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, @@ -54,6 +55,7 @@ Manifest.permission.ACCESS_NETWORK_STATE, Manifest.permission.WAKE_LOCK, Manifest.permission.RECORD_AUDIO, Manifest.permission.MODIFY_AUDIO_SETTINGS, Manifest.permission.CAMERA, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, HDLLinphoneSDKDemoNew/app/src/main/java/com/example/hdllinphonesdkdemo/LinphoneTestActivity.java
@@ -15,10 +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,7 +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" @@ -61,7 +67,9 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:inputType="number" /> android:inputType="number" android:text="1539850351294734338" /> <Button android:id="@+id/call_btn"