From 6cc05bf6044c72f63b289da6b0a542970b16ef75 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 14 十二月 2021 12:36:33 +0800
Subject: [PATCH] On Pro
---
HDL_ON/Common/HDLCommon.cs | 83 ++++++++++++++++++++++++++---------------
1 files changed, 52 insertions(+), 31 deletions(-)
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 47eddbb..6a2a061 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -307,7 +307,6 @@
//1.瑙嗗璁插巶瀹剁被鍨�
string interphoneTypeEnum = json["interphoneTypeEnum"].ToString();
if (string.IsNullOrEmpty(interphoneTypeEnum)) return;
- //
ESVideoInfo eSVideoInfo = new ESVideoInfo();// GetESOnVideoJson(jpushMessageInfo.expantContent);
//2.鏍规嵁鍙瀵硅鍘傚绫诲瀷锛屽鐞嗕笉鍚岀殑鏁版嵁
if (interphoneTypeEnum == InterphoneType.IMOUVISIAL.ToString())
@@ -319,7 +318,8 @@
eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString();
eSVideoInfo.Lc_Location = OnAppConfig.Instance.RequestHttpsHost.Contains("China") ? 0 : 1;
eSVideoInfo.Lc_PlayToken = json["token"].ToString();
- eSVideoInfo.Lc_Psk = json["cname"].ToString();
+ //eSVideoInfo.Lc_Psk = json["cname"].ToString();
+ eSVideoInfo.Lc_Psk = json["psk"].ToString();//2021-10-15 PSK瀛楁涓嶈兘鍙朿name
}
else if (interphoneTypeEnum == InterphoneType.EZVIZ.ToString())
{
@@ -327,6 +327,19 @@
eSVideoInfo.Lc_AccessToken = json["subToken"].ToString();//"瀛愯处鍙穞oken
eSVideoInfo.DeviceSerial = json["devSerial"].ToString();//璁惧搴忓垪鍙�
eSVideoInfo.HomeId = jpushMessageInfo.HomeId;
+ }
+ 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();
+ //ShowAlert("鐙勮�愬厠闂ㄥ彛鏈哄懠鍙�");
+ //鎵撳紑鍛煎彨椤甸潰
+ HDLLinphone.Current.ShowESVideoIntercom(eSVideoInfo);
+ return;
}
//3.鎵撳紑鍛煎彨椤甸潰
@@ -378,20 +391,8 @@
//娴嬭瘯璐﹀彿锛屼笉鎸や笅绾�
switch (UserInfo.Current.AccountString)
{
- case "13415629083":
- case "18316120654":
- case "15622703419":
- case "18824864143":
case "464027401@qq.com":
- case "2791308028@qq.com":
- case "13697499568":
- case "18666455392":
- case "13375012446":
- case "13602944661":
- case "18778381374":
- case "18316672920":
case "15626203746":
- case "551775569@qq.com":
return;
}
@@ -424,6 +425,14 @@
UserInfo.Current.LastTime = DateTime.MinValue;
UserInfo.Current.SaveUserInfo();
DB_ResidenceData.Instance.EixtAccount();
+ //4.娉ㄩ攢HDLSIP璐﹀彿鐧诲綍 2021-08-20
+ HDLLinphone.Current.LogoutAllAccount();
+#if __IOS__
+ //5.娓呯┖Siri鍏变韩鏁版嵁淇℃伅
+ new Other.SkipControl().SetData(false, "", "", "","");
+ var sDM = new SiriKit.SceneDateManager();
+ Console.WriteLine($"IsLogin:{sDM.IsLgoin};accessToken:{sDM.AccessToken};refreshToken:{sDM.RefreshToken};RegionUrl:{sDM.RegionUrl};HomeId:{sDM.HomeId}");
+#endif
}
catch (Exception ex)
{
@@ -481,6 +490,11 @@
}
MainPage.CurPageIndex = 9999;
MainPage.UserBasePage.ChooseCollection();
+#if __IOS__
+ var sdm = new SiriKit.SceneDateManager();
+ sdm.RegionUrl = DB_ResidenceData.Instance.CurrentRegion.regionUrl;
+ sdm.HomeId = DB_ResidenceData.Instance.CurrentRegion.id;
+#endif
}
}
//Dialog
@@ -520,9 +534,9 @@
}
- #endregion
+#endregion
- #region 鈻� 甯哥敤鏂规硶_______________________
+#region 鈻� 甯哥敤鏂规硶_______________________
/// <summary>
/// 璁剧疆涓嬪垝绾挎寜閽姸鎬�
/// 缁熶竴灏佽璁剧疆鏂规硶
@@ -595,9 +609,9 @@
Control.Ins.SearchLoaclGateway();
}
}
- #endregion
+#endregion
- #region 璺宠浆鎵撳紑钀ょ煶浜戞柟娉�
+#region 璺宠浆鎵撳紑钀ょ煶浜戞柟娉�
/// <summary>
/// 鑾峰彇瀛愯处鍙穞oken骞惰烦杞澶囧垪琛ㄩ〉闈�
@@ -648,18 +662,25 @@
{
if (b)
{
- Android.Content.Intent intent = new Android.Content.Intent();
- var bundle = new Android.OS.Bundle();
- //浼犻�抧ame鍙傛暟涓簍inyphp
- bundle.PutString("EzChildAccessToken", ezChildAccessToken);
- bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString);
- bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost);
- bundle.PutString("EzvizAppKey", "1aa98a90489b4838b966b57018b4b04b");
- bundle.PutInt("Platform", 1);
- bundle.PutString("HomeId", DB_ResidenceData.Instance.CurrentRegion.id);
- intent.PutExtras(bundle);
- intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity"));
- Shared.Application.Activity.StartActivity(intent);
+ ((BaseActivity)Shared.Application.Activity).SetPermission(result =>
+ {
+ if(result)
+ {
+ Android.Content.Intent intent = new Android.Content.Intent();
+ var bundle = new Android.OS.Bundle();
+ //浼犻�抧ame鍙傛暟涓簍inyphp
+ bundle.PutString("EzChildAccessToken", ezChildAccessToken);
+ bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString);
+ bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost);
+ bundle.PutString("EzvizAppKey", "1aa98a90489b4838b966b57018b4b04b");
+ bundle.PutInt("Platform", 1);
+ bundle.PutString("HomeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ intent.PutExtras(bundle);
+ intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity"));
+ Shared.Application.Activity.StartActivity(intent);
+ }
+ }, "android.permission.RECORD_AUDIO");
+
}
});
#endif
@@ -692,6 +713,6 @@
{ IsBackground = true }.Start();
}
- #endregion
+#endregion
}
}
--
Gitblit v1.8.0