From 0f13be8b24ef37fe16cd34c8411a907f93b7f304 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 28 十一月 2023 09:35:42 +0800
Subject: [PATCH] Merge branch 'Wxr-V2.4.2' into Google-2023-11-17-1

---
 HDL_ON/Common/HDLCommon.cs |   60 ++++++++++++++++++++++++++++++++++++------------------------
 1 files changed, 36 insertions(+), 24 deletions(-)

diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 472927b..f766680 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -258,7 +258,7 @@
         {
             try
             {
-                MainPage.Log($"鎺ユ敹鍒版帹閫�.\r\n{Newtonsoft.Json.JsonConvert.SerializeObject(jpushMessageInfo).ToString()}");
+                //Console.WriteLine($"鎺ユ敹鍒版帹閫侊紝锛岋紝锛�.{Newtonsoft.Json.JsonConvert.SerializeObject(jpushMessageInfo).ToString()}");
 
                 //Extras涓虹┖涓嶅鐞�
                 if (string.IsNullOrEmpty(jpushMessageInfo.Extras)) return;
@@ -357,37 +357,48 @@
                             //钀ょ煶鐚溂
                             eSVideoInfo.Lc_AccessToken = json["subToken"].ToString();//"瀛愯处鍙穞oken
                             eSVideoInfo.DeviceSerial = json["devSerial"].ToString();//璁惧搴忓垪鍙�
+                            eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString();
+                            eSVideoInfo.spk = json["spk"].ToString();
+
                             eSVideoInfo.HomeId = jpushMessageInfo.HomeId;
+                            if (json.ContainsKey("msgId") && !string.IsNullOrEmpty(json["msgId"].ToString()))
+                            {
+                                eSVideoInfo.msgId = json["msgId"].ToString();
+                            }
+                            if (json.ContainsKey("currentTime") && !string.IsNullOrEmpty(json["currentTime"].ToString()))
+                            {
+                                eSVideoInfo.currentTime = json["currentTime"].ToString();
+                            }
                         }
                         else if (interphoneTypeEnum == InterphoneType.HDL.ToString())
                         {
                             //HDL Linphone 鐙勮�愬厠
-                            eSVideoInfo.HomeId = jpushMessageInfo.HomeId;
-                            eSVideoInfo.callId = json["callId"].ToString();
-                            eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString();
-                            eSVideoInfo.DeviceName = json["deviceName"].ToString();
-                            eSVideoInfo.deviceSipAccount = json["deviceSipAccount"].ToString();
-                            eSVideoInfo.spk = json["spk"].ToString();
+                            //eSVideoInfo.HomeId = jpushMessageInfo.HomeId;
+                            //eSVideoInfo.callId = json["callId"].ToString();
+                            //eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString();
+                            //eSVideoInfo.DeviceName = json["deviceName"].ToString();
+                            //eSVideoInfo.deviceSipAccount = json["deviceSipAccount"].ToString();
+                            //eSVideoInfo.spk = json["spk"].ToString();
 
-                            //ShowAlert("鐙勮�愬厠闂ㄥ彛鏈哄懠鍙�");
-                            //鎵撳紑鍛煎彨椤甸潰
-                            HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo, InterphoneType.HDL.ToString());
+                            ////ShowAlert("鐙勮�愬厠闂ㄥ彛鏈哄懠鍙�");
+                            ////鎵撳紑鍛煎彨椤甸潰
+                            //HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo, InterphoneType.HDL.ToString());
                             return;
                         }
                         else if (interphoneTypeEnum == InterphoneType.FREEVIEW.ToString())
                         {
                             //鍏ㄨ閫� Linphone 鐙勮�愬厠
-                            eSVideoInfo.HomeId = jpushMessageInfo.HomeId;
-                            eSVideoInfo.callId = json["callId"].ToString();
-                            eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString();
-                            eSVideoInfo.DeviceName = json["deviceName"].ToString();
-                            eSVideoInfo.deviceSipAccount = json["deviceSipAccount"].ToString();
-                            eSVideoInfo.spk = json["spk"].ToString();
+                            //eSVideoInfo.HomeId = jpushMessageInfo.HomeId;
+                            //eSVideoInfo.callId = json["callId"].ToString();
+                            //eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString();
+                            //eSVideoInfo.DeviceName = json["deviceName"].ToString();
+                            //eSVideoInfo.deviceSipAccount = json["deviceSipAccount"].ToString();
+                            //eSVideoInfo.spk = json["spk"].ToString();
 
-                            //ShowAlert("鐙勮�愬厠闂ㄥ彛鏈哄懠鍙�");
-                            //鎵撳紑鍛煎彨椤甸潰
-                            HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo, InterphoneType.FREEVIEW.ToString());
-                            return;
+                            ////ShowAlert("鐙勮�愬厠闂ㄥ彛鏈哄懠鍙�");
+                            ////鎵撳紑鍛煎彨椤甸潰
+                            //HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo, InterphoneType.FREEVIEW.ToString());
+                            //return;
                         }
 
                         //3.鎵撳紑鍛煎彨椤甸潰
@@ -462,6 +473,7 @@
                 case "13580507523":
                 case "15626203746":
                 case "18316672920":
+                    
                     return;
             }
 
@@ -502,7 +514,7 @@
                     DB_ResidenceData.Instance.EixtAccount();
                     MainPage.Log("閫�鍑鸿处鍙锋竻绌烘暟鎹�");
                     //4.娉ㄩ攢HDLSIP璐﹀彿鐧诲綍 2021-08-20
-                    HDLLinphone.Current.LogoutAllAccount();
+                    //HDLLinphone.Current.LogoutAllAccount();
                     MainPage.Log("娉ㄩ攢HDLSIP璐﹀彿鐧诲綍");
 
 #if __IOS__
@@ -678,7 +690,7 @@
             if (internetStatus == 0)//娌℃湁缃戠粶杩炴帴 0
             {
                 MainPage.InternetStatus = 0;
-                DAL.Mqtt.MqttClient.InitState();
+                //DAL.Mqtt.MqttClient.DisConnectRemote();//.InitState();
             }
             else if (internetStatus == 1)//3,4G鐨勭綉缁滆繛鎺� 1
             {
@@ -764,8 +776,8 @@
                                         ((BaseActivity)Shared.Application.Activity).SetPermission(result =>
                                         {
                                             //2023骞�03鏈�29鏃�13:08:35 淇敼
-                                            Com.Videogo.Hdl.HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id);
-                                            Com.Videogo.Hdl.HDLEzvizSdk.Instance.JumpToCameraListActivity(Shared.Application.Activity, list);
+                                            //Com.Videogo.Hdl.HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id);
+                                            //Com.Videogo.Hdl.HDLEzvizSdk.Instance.JumpToCameraListActivity(Shared.Application.Activity, list);
                                             //if (result)
                                             //{
                                             //    Android.Content.Intent intent = new Android.Content.Intent();

--
Gitblit v1.8.0