From 76e8a76fb6634d9a81244dde3ca0b86e62b6211a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 06 九月 2023 17:54:51 +0800
Subject: [PATCH] 升级自研linphone SDK

---
 HDL-ON_Android/Properties/AndroidManifest.xml        |    2 
 HDL-ON_iOS/Info.plist                                |    4 +-
 HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs              |    8 +++
 HDL_ON/DAL/Server/HttpUtil.cs                        |    4 +-
 HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs     |   85 ++++++++++++++++++++++++------------------
 HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs |   10 ++--
 HDL_ON/UI/MainPage.cs                                |    2 
 SiriIntents/Server/HttpUtil.cs                       |    4 +-
 8 files changed, 68 insertions(+), 51 deletions(-)

diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 340f490..15bac20 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/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.1.2" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202308281">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.1.3" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202309061">
 	<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
 	<uses-permission android:name="android.permission.RECEIVE_SMS" />
 	<!--鍙嬬洘-->
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index e9a471c..c3eadee 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -11,7 +11,7 @@
 	<key>CFBundleName</key>
 	<string>On Pro</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.1.2</string>
+	<string>2.1.3</string>
 	<key>CFBundleURLTypes</key>
 	<array>
 		<dict>
@@ -36,7 +36,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>2.1.2</string>
+	<string>2.1.3</string>
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
 		<string>weixinULAPI</string>
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 5235064..b659327 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@
         /// 鍥哄畾鍩熷悕,姝e紡鐜
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// </summary>
-        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
+        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
         const string APP_KEY = "HDL-HOME-APP-TEST";
         const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
 
diff --git a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
index 50bd1a2..e782a1a 100644
--- a/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
@@ -454,7 +454,13 @@
 
 #if __IOS__
 
-            Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().CallWithUserName(mHDLCallVideoInfo.DeviceSipAccount, mHDLCallVideoInfo.DeviceName);
+            if (mHDLCallVideoInfo.spk == "door.gate")
+            {
+                Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().CallHDLSRWithUserName(mHDLCallVideoInfo.DeviceSipAccount, mHDLCallVideoInfo.DeviceName);   
+            }else{
+                Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().CallWithUserName(mHDLCallVideoInfo.DeviceSipAccount, mHDLCallVideoInfo.DeviceName);
+            }
+            
 
 #else
             //1.鍏堝懠鍙澶�
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index ddf24dc..9183580 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
         /// <summary>
         /// 鐗堟湰鍙�
         /// </summary>
-        public static string VersionString = "2.1.2";
+        public static string VersionString = "2.1.3";
         ///// <summary>
         ///// 瀹㈡埛绔被鍨�
         ///// </summary>
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
index a26909b..6fca48a 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -89,14 +89,14 @@
             #region top
             FrameLayout topView = new FrameLayout()
             {
-                Height = Application.GetRealHeight(64),
+                Height = Application.GetRealHeight(74),
                 BackgroundColor = CSS_Color.TopViewColor,
             };
             bodyView.AddChidren(topView);
 
             btnRoomTilte = new Button()
             {
-                Y = Application.GetRealHeight(30),
+                Y = Application.GetRealHeight(40),
                 Width = Application.GetRealWidth(170),
                 Height = Application.GetRealHeight(25),
                 TextAlignment = TextAlignment.CenterRight,
@@ -111,7 +111,7 @@
             btnFuncTitle = new Button()
             {
                 X = Application.GetRealWidth(209),
-                Y = Application.GetRealHeight(30),
+                Y = Application.GetRealHeight(40),
                 Width = Application.GetRealWidth(170),
                 Height = Application.GetRealHeight(25),
                 TextAlignment = TextAlignment.CenterLeft,
@@ -125,8 +125,8 @@
 
             contentPageView = new PageLayout()
             {
-                Y = Application.GetRealHeight(64),
-                Height = Application.GetRealHeight(667 - 64 - 49 + 30),
+                Y = Application.GetRealHeight(74),
+                Height = Application.GetRealHeight(667 - 74 - 49 + 30),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
                 IsShowPoint = false
             };
diff --git a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
index 13115eb..c5c07c0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -76,7 +76,7 @@
             #region top
             topView = new FrameLayout()
             {
-                Height = Application.GetRealHeight(64),
+                Height = Application.GetRealHeight(74),
                 BackgroundColor = CSS_Color.TopViewColor,
             };
             bodyView.AddChidren(topView);
@@ -122,7 +122,7 @@
 
                     btnSceneTilte = new Button()
                     {
-                        Y = Application.GetRealHeight(30),
+                        Y = Application.GetRealHeight(40),
                         //Width = Application.GetRealWidth(170),
                         Height = Application.GetRealHeight(25),
                         TextAlignment = TextAlignment.Center,
@@ -143,7 +143,7 @@
                 {
                     btnAutomationTitle = new Button()
                     {
-                        Y = Application.GetRealHeight(30),
+                        Y = Application.GetRealHeight(40),
                         Gravity = Gravity.CenterHorizontal,
                         Height = Application.GetRealHeight(25),
                         TextAlignment = TextAlignment.Center,
@@ -162,7 +162,7 @@
 
                     btnSceneTilte = new Button()
                     {
-                        Y = Application.GetRealHeight(30),
+                        Y = Application.GetRealHeight(40),
                         Width = otherWidth,
                         Height = Application.GetRealHeight(25),
                         TextAlignment = TextAlignment.CenterRight,
@@ -178,7 +178,7 @@
                     btnSecurityTitle = new Button()
                     {
                         X = btnAutomationTitle.Right,
-                        Y = Application.GetRealHeight(30),
+                        Y = Application.GetRealHeight(40),
                         Width = otherWidth,
                         Height = Application.GetRealHeight(25),
                         TextAlignment = TextAlignment.CenterLeft,
@@ -193,7 +193,7 @@
                 {
                     btnSceneTilte = new Button()
                     {
-                        Y = Application.GetRealHeight(30),
+                        Y = Application.GetRealHeight(40),
                         Width = Application.GetRealWidth(170),
                         Height = Application.GetRealHeight(25),
                         TextAlignment = TextAlignment.CenterRight,
@@ -208,7 +208,7 @@
                     btnAutomationTitle = new Button()
                     {
                         X = Application.GetRealWidth(209),
-                        Y = Application.GetRealHeight(30),
+                        Y = Application.GetRealHeight(40),
                         Width = Application.GetRealWidth(170),
                         Height = Application.GetRealHeight(25),
                         TextAlignment = TextAlignment.CenterLeft,
@@ -223,7 +223,7 @@
             btnAddIconBg = new Button()
             {
                 X = Application.GetRealWidth(337),
-                Y = Application.GetRealHeight(29),
+                Y = Application.GetRealHeight(39),
                 Width = Application.GetMinRealAverage(28),
                 Height = Application.GetMinRealAverage(28),
                 UnSelectedImagePath = "Public/AddIcon.png",
@@ -240,8 +240,8 @@
 
             contentPageView = new PageLayout()
             {
-                Y = Application.GetRealHeight(64),
-                Height = Application.GetRealHeight(667 - 64 - 49 + 30),
+                Y = Application.GetRealHeight(74),
+                Height = Application.GetRealHeight(667 - 74 - 49 + 30),
                 BackgroundColor = CSS_Color.BackgroundColor,
                 IsShowPoint = false
             };
@@ -399,36 +399,49 @@
                     var rowView = new FrameLayout();
                     new System.Threading.Thread(() =>
                     {
-                        foreach (var scene in listScene)
+                        try
                         {
-                            if(scene == null)
+                            foreach (var scene in listScene)
                             {
-                                continue;
+                                if (scene == null)
+                                {
+                                    continue;
+                                }
+                                if (scene.sceneType == SceneType.LightScene)
+                                {
+                                    continue;
+                                }
+                                System.Threading.Thread.Sleep(10);
+                                Application.RunOnMainThread(() =>
+                                {
+                                    if (index % 2 == 0)
+                                    {
+                                        rowView = new FrameLayout()
+                                        {
+                                            Height = Application.GetRealWidth(122),
+                                        };
+                                        sceneFunctionView.AddChidren(rowView);
+                                        sceneFunctionView.AddChidren(new Button()
+                                        {
+                                            Height = Application.GetRealHeight(7 + 7),
+                                        });
+                                    }
+                                    var functionView_X = Application.GetRealWidth((16 + 164) * (index % 2) + 16);
+
+                                    var functionView = LoadSceneFunctionDiv(functionView_X, scene);
+                                    rowView.AddChidren(functionView);
+                                    index++;
+                                });
                             }
-                            if(scene.sceneType == SceneType.LightScene)
-                            {
-                                continue;
-                            }
-                            System.Threading.Thread.Sleep(10);
+                        }catch(Exception ex)
+                        {
+                            MainPage.Log($"鍔犺浇鍦烘櫙鍒楄〃寮傚父锛歿ex.Message}");
+                        }
+                        finally
+                        {
                             Application.RunOnMainThread(() =>
                             {
-                                if (index % 2 == 0)
-                                {
-                                    rowView = new FrameLayout()
-                                    {
-                                        Height = Application.GetRealWidth(122),
-                                    };
-                                    sceneFunctionView.AddChidren(rowView);
-                                    sceneFunctionView.AddChidren(new Button()
-                                    {
-                                        Height = Application.GetRealHeight(7 + 7),
-                                    });
-                                }
-                                var functionView_X = Application.GetRealWidth((16 + 164) * (index % 2) + 16);
-
-                                var functionView = LoadSceneFunctionDiv(functionView_X, scene);
-                                rowView.AddChidren(functionView);
-                                index++;
+                                sceneFunctionView.AddChidren(new Button { Height = Application.GetRealHeight(30) });
                             });
                         }
                     })
@@ -439,8 +452,6 @@
             {
                 MainPage.Log("homepage erorr : " + ex.Message);
             }
-            sceneFunctionView.AddChidren(new Button { Height = Application.GetRealHeight(30) });
-
         }
 
         /// <summary>
diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs
index 8d4483c..dc7aca0 100644
--- a/SiriIntents/Server/HttpUtil.cs
+++ b/SiriIntents/Server/HttpUtil.cs
@@ -16,8 +16,8 @@
         /// 鍥哄畾鍩熷悕,姝e紡鐜
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// </summary>
-        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
+        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
         const string APP_KEY = "HDL-HOME-APP-TEST";
         const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
         //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm

--
Gitblit v1.8.0