562935844@qq.com
2023-09-05 98340bb2bbd3b0c8b877c7d3314023c40f942c02
视频监控加enablevideo设置
1个文件已添加
1个文件已删除
18个文件已修改
461 ■■■■■ 已修改文件
HDLLinphoneSDKDemoNew/.idea/encodings.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/.idea/misc.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/.gitignore 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/build.gradle 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/activity/HDLLinphoneMonitorActivity.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/activity/HDLLinphoneReverseCallActivity.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/core/service/HDLLinphoneService.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/app/.gitignore 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/app/build.gradle 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/app/src/main/AndroidManifest.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/app/src/main/java/com/example/hdllinphonesdkdemo/LinphoneTestActivity.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/app/src/main/java/com/example/hdllinphonesdkdemo/MainActivity.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/app/src/main/res/layout/activity_linphone_test.xml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/build.gradle 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/gradle/wrapper/gradle-wrapper.properties 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/gradlew 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/gradlew.bat 168 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Shared.Droid.HDLLinphone/Shared.Droid.HDLLinphone.sln 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Shared.Droid.HDLLinphone/Shared.Droid.HDLLinphone/obj/Release/jl/assets/org.linphone.core/share/doc/liblinphone-4.5.0/c/structprivate_1_1ismapcontainerimpl_3_01t_00_01void__t_3_01typename_01t_1_1key__type_00_01typena75682bb14a0833e99fd03a070051a2d9.png 补丁 | 查看 | 原始文档 | blame | 历史
HDLLinphoneSDKDemoNew/.idea/encodings.xml
New file
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Encoding">
    <file url="PROJECT" charset="UTF-8" />
  </component>
</project>
HDLLinphoneSDKDemoNew/.idea/misc.xml
@@ -3,12 +3,17 @@
  <component name="DesignSurface">
    <option name="filePathToZoomLevelMap">
      <map>
        <entry key="..\:/HDL/ProjectCode/AndroidLinphoneSdk/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/res/layout/activity_hdllinphone_intercom.xml" value="0.178125" />
        <entry key="..\:/HDL/ProjectCode/AndroidLinphoneSdk/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/res/layout/activity_hdllinphone_monitor.xml" value="0.16354166666666667" />
        <entry key="..\:/HDL/ProjectCode/AndroidLinphoneSdk/HDLLinphoneSDKDemoNew/app/src/main/res/layout/activity_linphone_test.xml" value="0.3536458333333333" />
        <entry key="..\:/HDL/ProjectCode/AndroidLinphoneSdk/HDLLinphoneSDKDemoNew/app/src/main/res/layout/activity_main.xml" value="0.3536458333333333" />
        <entry key="HDLLinphoneSDK/src/main/res/drawable/lp_dialog_background.xml" value="0.22291666666666668" />
        <entry key="HDLLinphoneSDK/src/main/res/drawable/lp_line_shape.xml" value="0.22291666666666668" />
        <entry key="app/src/main/res/layout/activity_linphone_test.xml" value="0.20677083333333332" />
      </map>
    </option>
  </component>
  <component name="ExternalStorageConfigurationManager" enabled="true" />
  <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/build/classes" />
  </component>
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/.gitignore
@@ -1 +1,11 @@
/build
/build
*.idea
/.idea/libraries
/.idea/modules
/.idea/compiler.xml
/.idea/gradle.xml
/.idea/jarRepositories.xml
/.idea/misc.xml
/.idea/modules.xml
/.idea/vcs.xml
/.idea/workspace.xml
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/build.gradle
@@ -56,7 +56,9 @@
    implementation 'com.android.support.constraint:constraint-layout:2.0.4'
//    implementation "org.linphone:linphone-sdk-android:4.5.0"
    embed "org.linphone:linphone-sdk-android:4.5.0"
    implementation 'com.google.code.gson:gson:2.9.0'
//    implementation 'com.android.support.constraint:constraint-layout:2.0.4'
//    embed(name:'liblinphone-android-sdk', ext: 'aar')
    embed 'com.tencent.tinker:tinker-patch-gradle-plugin:1.9.1'
    embed 'com.tencent.tinker:tinker-android-lib:1.9.1'
}
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java
@@ -1,7 +1,11 @@
package com.hdl.hdllinphonesdk;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Build;
import android.os.IBinder;
import android.util.Log;
import android.view.TextureView;
import android.widget.Toast;
@@ -66,6 +70,7 @@
    private String mUsername, mPassword, mServerIP;
    //    private TextureView mRenderingView, mPreviewView;
    private boolean isAutoJumpCallView;//是否自动跳转呼叫页面
    private String intercomeType;
    private HDLLinphoneKit() {
@@ -144,7 +149,7 @@
            @Override
            public void incomingCall(Call linphoneCall) {
                super.incomingCall(linphoneCall);
                Log.d("HDLLinphoneKit","------incomingCall------");
                Log.d("HDLLinphoneKit", "------incomingCall------");
                if (linphoneCall != null) {
                    String callUsername = linphoneCall.getRemoteAddress().getUsername();
                    HDLLog.I("来电号码:" + callUsername);
@@ -163,21 +168,21 @@
            @Override
            public void outgoingInit() {
                super.outgoingInit();
                Log.d("HDLLinphoneKit","------outgoingInit------");
                Log.d("HDLLinphoneKit", "------outgoingInit------");
            }
            @Override
            public void callConnected() {
                super.callConnected();
                // 视频通话默认免提,语音通话默认非免提
                Log.d("HDLLinphoneKit","------callConnected------");
                Log.d("HDLLinphoneKit", "------callConnected------");
                toggleSpeaker(true);
            }
            @Override
            public void callEnd() {
                super.callEnd();
                Log.d("HDLLinphoneKit","------callEnd------");
                Log.d("HDLLinphoneKit", "------callEnd------");
//                context.sendBroadcast(new Intent(HDLLinphoneIntercomActivity.RECEIVE_FINISH_VIDEO_ACTIVITY));
            }
        });
@@ -196,6 +201,24 @@
        }
    }
    private HDLLinphoneService mService;
    private final ServiceConnection connection = new ServiceConnection() {
        @Override
        public void onServiceConnected(ComponentName name, IBinder ibinder) {
            HDLLinphoneService.LinphoneBinder binder = (HDLLinphoneService.LinphoneBinder) ibinder;
            mService = binder.getService();
            //初始化
            mService.initCore();
        }
        @Override
        public void onServiceDisconnected(ComponentName name) {
            mService = null;
        }
    };
    /**
     * 开启服务
     *
@@ -206,12 +229,8 @@
            if (!HDLLinphoneService.isReady()) {
                Intent intent = new Intent(Intent.ACTION_MAIN);
                intent.setClass(context, HDLLinphoneService.class);
                context.startService(intent);
//                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
//                    context.startForegroundService(intent);//解决android8.0以上无法启动服务的问题
//                } else {
//                    context.startService(intent);
//                }
                context.bindService(intent, connection, Context.BIND_AUTO_CREATE);
            }
        } catch (Exception e) {
            e.printStackTrace();
@@ -251,7 +270,12 @@
        mUsername = username;
        mPassword = password;
        mServerIP = serverIP;
        intercomeType = inter_type;
        login(inter_type);
    }
    public String getIntercomeType() {
        return intercomeType;
    }
    /**
@@ -352,6 +376,8 @@
     * 登录 SIP 服务器
     */
    private void loginToServer(String inter_type) {
        Log.e("==========", "loginToServer: ");
        try {
            if (mUsername == null || mPassword == null || mServerIP == null) {
                throw new RuntimeException("The sip account is not configured.");
@@ -380,7 +406,7 @@
        Core mLinphoneCore = HDLLinphoneService.getCore();
        if (mLinphoneCore == null) return;
        AuthInfo authInfo = Factory.instance().createAuthInfo(name, null, password, null, null, host);
        AuthInfo authInfo = Factory.instance().createAuthInfo(name, name, password, null, null, host);
        AccountCreator mAccountCreator = mLinphoneCore.createAccountCreator(null);
        mAccountCreator.setUsername(name);
        mAccountCreator.setDomain(host);
@@ -419,6 +445,7 @@
        prxCfg.setQualityReportingCollector(null);
        prxCfg.setQualityReportingInterval(0);
        prxCfg.enableRegister(true);
        //全视通需要设置固定代理服务器ip
        prxCfg.setServerAddr("sip:139.159.157.75:46000;transport=udp");
        mLinphoneCore.addProxyConfig(prxCfg);//添加代理配置。如果启用了注册,这将开始在代理上注册。
@@ -488,7 +515,7 @@
            params.enableLowBandwidth(false);
            params.setAudioBandwidthLimit(0); // disable limitation
            currentCall.acceptWithParams(params);
            Log.d("HDLLinphoneKit","---acceptCall= ");
            Log.d("HDLLinphoneKit", "---acceptCall= ");
        } catch (Exception e) {
            e.printStackTrace();
@@ -552,7 +579,7 @@
     * 设置外放设备
     */
    private void routeAudioToSpeakerHelper(boolean speakerOn) {
        Log.d("HDLLinphoneKit","设置外放设备[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;
@@ -561,14 +588,14 @@
            if (currentCall == null) return;
            for (AudioDevice audioDevice : HDLLinphoneService.getCore().getAudioDevices()) {
                Log.d("HDLLinphoneKit","audioDevice.getType()= " + audioDevice.getType());
                Log.d("HDLLinphoneKit", "audioDevice.getType()= " + audioDevice.getType());
            }
            for (AudioDevice audioDevice : HDLLinphoneService.getCore().getAudioDevices()) {
                Log.d("HDLLinphoneKit","设置外放设备speakerOn=" + speakerOn + " audioDevice.getType()=" + audioDevice.getType());
                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");
                    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/HDLLinphoneMonitorActivity.java
@@ -30,6 +30,7 @@
import com.hdl.hdllinphonesdk.utils.HDLLog;
import org.linphone.core.Call;
import org.linphone.core.CallParams;
import org.linphone.core.Core;
import org.linphone.core.CoreListenerStub;
@@ -56,6 +57,7 @@
    //Linphone
    private CoreListenerStub mCoreListener;
    private boolean enableVideo = false;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
@@ -235,7 +237,7 @@
     */
    private void onClickUnlock() {
        try {
            AlertDialog.Builder builder = new AlertDialog.Builder(this,R.style.CustomAlertDialog);
            AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.CustomAlertDialog);
            builder.setTitle(R.string.lp_tipStr);
            builder.setMessage(R.string.tip_confirm_unlock);
@@ -261,8 +263,8 @@
            AlertDialog dialog = builder.create();
            dialog.show();
        }catch (Exception exception){
            Log.e(TAG,  exception.getMessage());
        } catch (Exception exception) {
            Log.e(TAG, exception.getMessage());
        }
    }
@@ -333,8 +335,16 @@
                    // Once call is finished (end state), terminate the activity
                    // We also check for released state (called a few seconds later) just in case
                    // we missed the first one
                    enableVideo = false;
                    showToast(getString(R.string.lp_endMonitoringStr));
                    finish();
                } else if (state == Call.State.StreamsRunning) {
                    if (HDLLinphoneKit.getInstance().getIntercomeType().equals(HDLLinphoneKit.INTER_PHONE_TYPE_HDL)) {
                        if (!enableVideo) {
                            enableVideo(core, call);
                            enableVideo = true;
                        }
                    }
                }
            }
        };
@@ -350,6 +360,20 @@
        }
    }
    void enableVideo(Core core, Call call) {
//        Call currentCall = HDLLinphoneService.getCore().getCurrentCall();
        CallParams params = call.getCurrentParams();
        if (params == null) {
            params = core.createCallParams(call);
        }
        params.enableVideo(true);
        params.enableLowBandwidth(false);
        params.setAudioBandwidthLimit(0); // disable limitation
        call.update(params);
    }
    /**
     * onDestroyLinphone
     */
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/activity/HDLLinphoneReverseCallActivity.java
@@ -32,6 +32,7 @@
import com.hdl.hdllinphonesdk.utils.HDLLog;
import org.linphone.core.Call;
import org.linphone.core.CallParams;
import org.linphone.core.Core;
import org.linphone.core.CoreListenerStub;
@@ -74,6 +75,7 @@
    private CoreListenerStub mCoreListener;
    private String deviceSipAccount;//设备SIP账号
    private boolean enableVideo = false;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
@@ -265,7 +267,7 @@
     */
    private void onClickUnlock() {
        try {
            AlertDialog.Builder builder = new AlertDialog.Builder(this,R.style.CustomAlertDialog);
            AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.CustomAlertDialog);
            builder.setTitle(R.string.lp_tipStr);
            builder.setMessage(R.string.tip_confirm_unlock);
@@ -291,8 +293,8 @@
            AlertDialog dialog = builder.create();
            dialog.show();
        }catch (Exception exception){
            Log.e(TAG,  exception.getMessage());
        } catch (Exception exception) {
            Log.e(TAG, exception.getMessage());
        }
    }
@@ -419,6 +421,13 @@
                    // we missed the first one
                    showToast(getString(R.string.lp_endOfCallStr));
                    finish();
                } else if (state == Call.State.StreamsRunning) {
                    if (HDLLinphoneKit.getInstance().getIntercomeType().equals(HDLLinphoneKit.INTER_PHONE_TYPE_HDL)) {
                        if (!enableVideo) {
                            enableVideo(core, call);
                            enableVideo = true;
                        }
                    }
                }
            }
        };
@@ -435,6 +444,21 @@
    }
    void enableVideo(Core core, Call call) {
//        Call currentCall = HDLLinphoneService.getCore().getCurrentCall();
        CallParams params = call.getCurrentParams();
        if (params == null) {
            params = core.createCallParams(call);
        }
        params.enableVideo(true);
        params.enableLowBandwidth(false);
        params.setAudioBandwidthLimit(0); // disable limitation
        call.update(params);
    }
    /**
     * onDestroyLinphone
     */
HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/core/service/HDLLinphoneService.java
@@ -6,17 +6,22 @@
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Binder;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.SystemClock;
import android.support.v4.app.NotificationCompat;
import android.telecom.ConnectionService;
import com.google.gson.Gson;
import com.hdl.hdllinphonesdk.R;
import com.hdl.hdllinphonesdk.activity.HDLLinphoneIntercomActivity;
import com.hdl.hdllinphonesdk.activity.HDLLinphoneReverseCallActivity;
@@ -51,7 +56,7 @@
public class HDLLinphoneService extends Service {
    private static final String START_LINPHONE_LOGS = " ==== HDLLinphoneService ====";
    // Keep a static reference to the Service so we can access it from anywhere in the app
    private static HDLLinphoneService sInstance;
    private volatile static HDLLinphoneService sInstance;
    private PendingIntent mKeepAlivePendingIntent;
    private static PhoneCallback sPhoneCallback;//通话状态回调
@@ -84,9 +89,18 @@
        return sInstance.mCore;
    }
    public class LinphoneBinder extends Binder {
        public HDLLinphoneService getService() {
            return HDLLinphoneService.this;
        }
    }
    private final IBinder binder = new LinphoneBinder();
    @Override
    public IBinder onBind(Intent intent) {
        return null;
        return binder;
    }
    /**
@@ -141,11 +155,17 @@
    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        super.onStartCommand(intent, flags, startId);
       /* if (sInstance != null) {
            return START_STICKY;
        }*/
        return START_STICKY;
    }
    public void initCore() {
        // If our Service is already running, no need to continue
        if (sInstance != null) {
            return START_STICKY;
        }
        // Our Service has been started, we can keep our reference on it
        // From now one the Launcher will be able to call onServiceReady()
@@ -169,7 +189,6 @@
        mTimer = new Timer("Linphone scheduler");
        mTimer.schedule(lTask, 0, 20);
        return START_STICKY;
    }
    @Override
@@ -213,7 +232,7 @@
        String basePath = getFilesDir().getAbsolutePath();
        Factory.instance().setLogCollectionPath(basePath);
        Factory.instance().enableLogCollection(LogCollectionState.Enabled);
        Factory.instance().setDebugMode(false, getString(R.string.app_name));
        Factory.instance().setDebugMode(true, "HDLLinphone");
        // Dump some useful information about the device we're running on
//        HDLLog.I(START_LINPHONE_LOGS);
//        dumpDeviceInformation();
@@ -260,8 +279,9 @@
            @Override
            public void onRegistrationStateChanged(Core core, ProxyConfig proxyConfig, RegistrationState registrationState, String message) {
                String state = registrationState.toString();
                HDLLog.i(START_LINPHONE_LOGS, "registrationState: " + state);
                HDLLog.i(START_LINPHONE_LOGS, "registrationState: " + state + ",message:" + message);
                HDLLog.i(START_LINPHONE_LOGS, "Registration info=" + new Gson().toJson(proxyConfig));
                if (state.equals(RegistrationState.None.toString())) {
                    if (sRegistrationCallback != null) {
                        sRegistrationCallback.registrationNone();
HDLLinphoneSDKDemoNew/app/.gitignore
@@ -1 +1,11 @@
/build
/build
*.idea
/.idea/libraries
/.idea/modules
/.idea/compiler.xml
/.idea/gradle.xml
/.idea/jarRepositories.xml
/.idea/misc.xml
/.idea/modules.xml
/.idea/vcs.xml
/.idea/workspace.xml
HDLLinphoneSDKDemoNew/app/build.gradle
@@ -37,9 +37,7 @@
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:2.0.4'
    implementation project(path: ':HDLLinphoneSDK')
//    implementation project(path: ':HDLLinphoneSDK')
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//    implementation project(':HDLLinphoneSDK')
}
HDLLinphoneSDKDemoNew/app/src/main/AndroidManifest.xml
@@ -2,6 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.hdllinphonesdkdemo">
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
HDLLinphoneSDKDemoNew/app/src/main/java/com/example/hdllinphonesdkdemo/LinphoneTestActivity.java
@@ -10,15 +10,14 @@
import android.widget.Toast;
import com.hdl.hdllinphonesdk.HDLLinphoneKit;
import com.hdl.hdllinphonesdk.activity.HDLLinphoneMonitorActivity;
import com.hdl.hdllinphonesdk.activity.HDLLinphoneReverseCallActivity;
import com.hdl.hdllinphonesdk.callback.OnHDLLinphoneCallListener;
public class LinphoneTestActivity extends Activity {
    private static final String password = "MITJio1MhRrYXGWXVMoiVmXrR";
    private static final String serverIP = "47.96.88.250:25060";
//    private static final String password = "763548";
//    private static final String serverIP = "139.159.157.75:46000";//""116.62.26.215:35060";
    private static final String password = "xFNxyrTIM8gLAOGDw3OiuzV5F";
    private static final String serverIP = "47.96.88.250:25060";//""116.62.26.215:35060";
    private String account = "";
    // 登录
@@ -27,7 +26,7 @@
    // 呼叫
    private EditText numberEdit;
    private Button callBtn;
    private Button callBtn,monitorBtn;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
@@ -58,6 +57,16 @@
//            HDLLinphoneKit.getInstance().callTo(number, true);
        });
        monitorBtn = findViewById(R.id.monitor_btn);
        monitorBtn.setOnClickListener(view -> {
            String number = numberEdit.getText().toString().trim();
            if (number.equals("")) return;
            // 监控
            HDLLinphoneKit.getInstance().callTo(number, true);
            Intent intent = new Intent(LinphoneTestActivity.this, HDLLinphoneMonitorActivity.class);
            startActivity(intent);
        });
        //1.初始化SDK,并注册HDLLinphoneService
        HDLLinphoneKit.getInstance().initLinphone(this);
        //2.设置是否自动跳转呼叫,如果对接极光推送再弹出页面,这里要设置false
HDLLinphoneSDKDemoNew/app/src/main/java/com/example/hdllinphonesdkdemo/MainActivity.java
@@ -42,10 +42,10 @@
        mTextView.setOnClickListener(v -> HDLLinphoneKit.getInstance()
                .setAccountAndLogin(
                        "A583853817423247",
                        "763548",
                        "139.159.157.75:46000",
                        HDLLinphoneKit.INTER_PHONE_TYPE_FREEVIEW
                        "677890543690887170",
                        "xFNxyrTIM8gLAOGDw3OiuzV5F",
                        "47.96.88.250:25060",
                        HDLLinphoneKit.INTER_PHONE_TYPE_HDL
                ));
        mTextView4.setOnClickListener(v -> HDLLinphoneKit.getInstance().setAccountAndLogin("8888", "85521566", "47.96.88.250:35060", HDLLinphoneKit.INTER_PHONE_TYPE_FREEVIEW));
HDLLinphoneSDKDemoNew/app/src/main/res/layout/activity_linphone_test.xml
@@ -28,7 +28,7 @@
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:inputType="number"
            android:text="1544915212865298434"
            android:text="1677890543690887170"
            />
        <Button
@@ -64,7 +64,7 @@
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:inputType="number"
            android:text="1661666172727111682"
            android:text="1684889786171437057"
            />
        <Button
@@ -75,6 +75,15 @@
            android:paddingEnd="10dp"
            android:text="呼叫"
            android:textSize="18sp" />
        <Button
            android:id="@+id/monitor_btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingStart="10dp"
            android:paddingEnd="10dp"
            android:text="监控"
            android:textSize="18sp" />
    </LinearLayout>
</LinearLayout>
HDLLinphoneSDKDemoNew/build.gradle
@@ -5,7 +5,7 @@
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.1.0"
        classpath "com.android.tools.build:gradle:4.1.2"
        classpath 'com.github.kezong:fat-aar:1.3.6'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
HDLLinphoneSDKDemoNew/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,5 @@
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
#distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
HDLLinphoneSDKDemoNew/gradlew
old mode 100755 new mode 100644
HDLLinphoneSDKDemoNew/gradlew.bat
@@ -1,84 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
Shared.Droid.HDLLinphone/Shared.Droid.HDLLinphone.sln
@@ -1,25 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.808.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.Droid.HDLLinphone", "Shared.Droid.HDLLinphone\Shared.Droid.HDLLinphone.csproj", "{703D29ED-674F-44A8-8AAD-863035899D4B}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {703D29ED-674F-44A8-8AAD-863035899D4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {703D29ED-674F-44A8-8AAD-863035899D4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {703D29ED-674F-44A8-8AAD-863035899D4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {703D29ED-674F-44A8-8AAD-863035899D4B}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
        SolutionGuid = {47BF95E2-B6AD-4F82-93B4-D740DFDFA319}
    EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.808.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.Droid.HDLLinphone", "Shared.Droid.HDLLinphone\Shared.Droid.HDLLinphone.csproj", "{703D29ED-674F-44A8-8AAD-863035899D4B}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {703D29ED-674F-44A8-8AAD-863035899D4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {703D29ED-674F-44A8-8AAD-863035899D4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {703D29ED-674F-44A8-8AAD-863035899D4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {703D29ED-674F-44A8-8AAD-863035899D4B}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
    GlobalSection(ExtensibilityGlobals) = postSolution
        SolutionGuid = {47BF95E2-B6AD-4F82-93B4-D740DFDFA319}
    EndGlobalSection
EndGlobal
Shared.Droid.HDLLinphone/Shared.Droid.HDLLinphone/obj/Release/jl/assets/org.linphone.core/share/doc/liblinphone-4.5.0/c/structprivate_1_1ismapcontainerimpl_3_01t_00_01void__t_3_01typename_01t_1_1key__type_00_01typena75682bb14a0833e99fd03a070051a2d9.png
Binary files differ