a0e4d2fdc63d8c568d25e9970d83177cd9697004..dc9a1b15bb69227e19afc070adf58156a362d2a2
2024-09-30 wxr
安卓可视对讲响铃,
dc9a1b 对比 | 目录
2024-09-30 wxr
Update HDLLinphone.cs
2a88b9 对比 | 目录
2024-09-30 wxr
Update HomePage.cs
30c21a 对比 | 目录
2024-09-30 wxr
Update AndroidManifest.xml
b28a36 对比 | 目录
3个文件已修改
91 ■■■■ 已修改文件
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.7.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409291">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.7.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409302">
    <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <!--程序可以读取设备外部存储空间(内置SDcard和外置SDCard)的文件,我的文件等-->
HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
@@ -774,7 +774,14 @@
            public void OnAnswerAction()
            {
                //showToast("接听");
                HDLLinphoneKit.Instance.SetMediaPlayerLooping(false);
                try
                {
                    HDLLinphoneKit.Instance.SetMediaPlayerLooping(false);
                }
                catch (Exception ex)
                {
                    MainPage.Log("铃声关闭异常:" + ex.StackTrace);
                }
                hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL);
            }
            /// <summary>
@@ -794,10 +801,23 @@
            public void OnRejectCallAction()
            {
                //showToast("拒接");
                HDLLinphoneKit.Instance.SetMediaPlayerLooping(false);
                hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL);
                try
                {
                    HDLLinphoneKit.Instance.SetMediaPlayerLooping(false);
                }
                catch (Exception ex)
                {
                    MainPage.Log("铃声关闭异常:" + ex.StackTrace);
                }
                try
                {
                    hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL);
                }
                catch (Exception ex)
                {
                    MainPage.Log("OnRejectCallAction异常:" + ex.StackTrace);
                }
            }
            /// <summary>
            /// 截图成功事件
            /// </summary>
@@ -830,15 +850,43 @@
            /// </summary>
            public void OnCallAllRejection()
            {
                HDLLinphoneKit.Instance.SetMediaPlayerLooping(false);
                hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL);
                hdlLinphone.HDLRejectCallIn();
                try
                {
                    HDLLinphoneKit.Instance.SetMediaPlayerLooping(false);
                }
                catch (Exception ex)
                {
                    MainPage.Log("铃声关闭异常:" + ex.StackTrace);
                }
                try
                {
                    hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL);
                    hdlLinphone.HDLRejectCallIn();
                }
                catch (Exception ex)
                {
                    MainPage.Log("全部挂断异常:" + ex.StackTrace);
                }
            }
            public void OnMissedCallsAction()
            {
                HDLLinphoneKit.Instance.SetMediaPlayerLooping(false);
                hdlLinphone.HDLUpdateCallStatus(CallStatusType.MISSED, InterphoneType.HDL);
                try
                {
                    HDLLinphoneKit.Instance.SetMediaPlayerLooping(false);
                }
                catch (Exception ex)
                {
                    MainPage.Log("铃声关闭异常:" + ex.StackTrace);
                }
                try
                {
                    hdlLinphone.HDLUpdateCallStatus(CallStatusType.MISSED, InterphoneType.HDL);
                }
                catch (Exception ex)
                {
                    MainPage.Log("OnMissedCallsAction异常:" + ex.StackTrace);
                }
            }
        }
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -564,32 +564,33 @@
                #endregion
#if DEBUG
                //bool isPlay= false;
                btnResidenceName.MouseUpEventHandler = (envent, ee) =>
                {
#if __ANDROID__
                    //Com.Hdl.Hdllinphonesdk.HDLLinphoneKit.Instance.PlayRingtone();
                    //Android.Media.AudioManager audioManager = (Android.Media.AudioManager)Application.Activity.GetSystemService(Android.Content.Context.AudioService);
                    //Console.WriteLine(audioManager.RingerMode);
                    try
                    {
                        var ddd = Com.Hdl.Hdllinphonesdk.HDLLinphoneKit.Instance.AudioManager.RingerMode ;
                        Console.WriteLine(ddd + ";;;;ddd");//    ddd    Vibrate    震动 、、    ddd    Silent    静音//    ddd    Normal
                    }
                    catch(Exception e)
                    {
                        Console.WriteLine("dddd"+e.StackTrace);
                    }
                    //try
                    //{
                    //    var ddd = Com.Hdl.Hdllinphonesdk.HDLLinphoneKit.Instance.AudioManager.RingerMode ;
                    //    Console.WriteLine(ddd + ";;;;ddd");//    ddd    Vibrate    震动 、、    ddd    Silent    静音//    ddd    Normal
                    //}
                    //catch(Exception e)
                    //{
                    //    Console.WriteLine("dddd"+e.StackTrace);
                    //}
#elif __IOS__
                    //if (isPlay)
                    //{
                    //    isPlay = false;
                    //    soundPlayer.StopSound();
                    //    Other.SoundPlayer.Ins.StopSound();
                    //}
                    //else
                    //{
                    //    isPlay = true;
                    //    soundPlayer.PlaySound();
                    //    Other.SoundPlayer.Ins.PlaySound();
                    //}
#endif