From 9d447e6fabb17cb3a19525715a669e3b601fb8bd Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期二, 28 三月 2023 15:56:42 +0800 Subject: [PATCH] 2023年03月28日15:56:14 --- HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs | 139 ++++++++++++++++++++++++++++++--------------- HDL_ON/Common/HDLCommon.cs | 2 HDL-ON_iOS/HDL-ON_iOS.csproj | 6 +- HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs | 2 4 files changed, 97 insertions(+), 52 deletions(-) diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index 1ff2a48..5390c52 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -101,9 +101,6 @@ <Reference Include="Shared.IOS.LCVideoOnSDK"> <HintPath>..\DLL\LC\IOS\Shared.IOS.LCVideoOnSDK.dll</HintPath> </Reference> - <Reference Include="Shared.IOS.HDLSceneSiri"> - <HintPath>..\DLL\IOS\Shared.IOS.HDLSceneSiri.dll</HintPath> - </Reference> <Reference Include="Shared.IOS.HDLLinphoneSDK"> <HintPath>..\DLL\Linphone\iOS\Shared.IOS.HDLLinphoneSDK.dll</HintPath> </Reference> @@ -116,6 +113,9 @@ <Reference Include="Shared.IOS"> <HintPath>..\DLL\Shared.IOS.dll</HintPath> </Reference> + <Reference Include="Shared.IOS.HDLSceneSiri"> + <HintPath>..\DLL\IOS\Shared.IOS.HDLSceneSiri.dll</HintPath> + </Reference> </ItemGroup> <ItemGroup> <PackageReference Include="Newtonsoft.Json"> diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs index cbcb32f..6d6b206 100644 --- a/HDL_ON/Common/HDLCommon.cs +++ b/HDL_ON/Common/HDLCommon.cs @@ -398,7 +398,7 @@ return; } ///瑙嗛闂ㄩ攣 - HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.SkipRTVActivity(expantContent.devSerial, expantContent.deviceId,expantContent.spk); + HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.SkipRTVActivity(expantContent.devSerial, expantContent.deviceId,expantContent.spk,true); } catch { } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs index ccca825..8127c21 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs @@ -39,24 +39,27 @@ } -#region --------- 璺宠浆鍒癆ndroid閭h竟鐨勬柟娉�(钀ょ煶瑙嗛闂ㄩ攣) -------- + #region --------- 璺宠浆鍒癆ndroid閭h竟鐨勬柟娉�(钀ょ煶瑙嗛闂ㄩ攣) -------- /// <summary> /// 璇诲彇浜戠鐨勪笂璁惧鍒楄〃(android婧愮敓娣诲姞璁惧鍒颁簯绔垚鍔熷悗) /// <paramref name="devSerial"/>璁惧搴忓垪鍙�</param> /// </summary> public void SkipAddDeviceActivity(string spk) { -#if __IOS__ -#else this.InitializationAndroidData((isBools) => { - if (!isBools) { - this.MainThread(()=> { + if (!isBools) + { + this.MainThread(() => + { this.ShowTip("鍏堣幏鍙栬悿鐭充簯瀛愯处鍙穞oken澶辫触銆�"); }); } +#if __IOS__ + +#else HDLEzvizSdk.Instance.JumpToEZScanActivity(Application.Activity,spk); HDLEzvizSdk.SetAddCallback(new AndroidIHdlInterface((isBool, adnroidActionDevSerial) => { @@ -77,11 +80,12 @@ } })); +#endif }); -#endif + } /// <summary> @@ -90,39 +94,57 @@ /// <param name="deviceSerial">璁惧搴忓垪鍙�</param> /// <param name="deviceId">璁惧id(浜戠涓奷eviceId)</param> /// <param name="spk">璁惧spk(浜戦泙涓婂畾涔夊ソ鐨�)</param> - public void SkipRTVActivity(string deviceSerial, string deviceId, string spk) + /// <param name="isDialog">鏄惁闇�瑕佸脊妗�</param> + public void SkipRTVActivity(string deviceSerial, string deviceId, string spk, bool isDialog) { -#if __IOS__ -#else + this.InitializationAndroidData((isBools) => { if (!isBools) { - this.MainThread(() => { + this.MainThread(() => + { this.ShowTip("鍏堣幏鍙栬悿鐭充簯瀛愯处鍙穞oken澶辫触銆�"); }); } - Video.View.ShowDialog.Currnet.ClickBox(Language.StringByID(StringId.laizimenlinghujiao), (dialog) => - { - dialog.Close(); - HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk); - }, (dialog) => - { - dialog.Close(); - }); - - }); - + if (isDialog) + { + Video.View.ShowDialog.Currnet.ClickBox(Language.StringByID(StringId.laizimenlinghujiao), (dialog) => + { + dialog.Close(); +#if __IOS__ + +#else + HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk); #endif + }, (dialog) => + { + dialog.Close(); + }); + } + else + { +#if __IOS__ +#else + HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk); +#endif + } + + + }); + + + } /// <summary> /// 娴忚鍘嗗彶璁板綍 /// </summary> public void SkipRecordActivity(string deviceId) { - this.InitializationAndroidData((s)=> { + this.InitializationAndroidData((s) => + { #if __IOS__ #else @@ -164,8 +186,8 @@ /// </summary> public void InitializationAndroidData(Action<bool> action) { - - + + bool isBool = true; this.SunThread(() => { @@ -179,24 +201,24 @@ { //Token isBool = false; - return; + return; } Application.RunOnMainThread(() => { #if __IOS__ - //iOS - //鍒濆鍖栬悿鐭充簯SDK锛屼腑鏂囧浗鍐卥ey銆佽嫳鏂囨捣澶杒ey 寮�鍙戣�呰处鍙蜂娇鐢ㄥ簲鐢ㄥ寘鍚嶇敵璇风殑APPKEY锛屼笉鍚屽寘鍚嶅簲鐢ㄩ渶閰嶇疆涓嶅悓鐨凙PPKEY - EZSDK.IOS.EZSDK.SharedInstance().InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b"); - //1.璁剧疆鎵�闇�娌充笢鐨凙ccessToken鍜孯efreshToken銆佸煙鍚嶅湴鍧� - EZSDK.IOS.EZSDK.SharedInstance().SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken); - EZSDK.IOS.EZSDK.SharedInstance().SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, DB_ResidenceData.Instance.CurrentRegion.id); - //2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK - EZSDK.IOS.EZSDK.SharedInstance().SetEZAccessToken(ezChildAccessToken); - ////3.鎵撳紑鎽勫儚澶磋澶囧垪琛ㄩ〉闈� - EZSDK.IOS.EZSDK.SharedInstance().Go2EZvizMonitor(); - //EZSDK.IOS.EZDeviceInfo info = new EZSDK.IOS.EZDeviceInfo(); - //info.de - //EZSDK.IOS.EZSDK.Play(info); + //iOS + //鍒濆鍖栬悿鐭充簯SDK锛屼腑鏂囧浗鍐卥ey銆佽嫳鏂囨捣澶杒ey 寮�鍙戣�呰处鍙蜂娇鐢ㄥ簲鐢ㄥ寘鍚嶇敵璇风殑APPKEY锛屼笉鍚屽寘鍚嶅簲鐢ㄩ渶閰嶇疆涓嶅悓鐨凙PPKEY + EZSDK.IOS.EZSDK.SharedInstance().InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b"); + //1.璁剧疆鎵�闇�娌充笢鐨凙ccessToken鍜孯efreshToken銆佸煙鍚嶅湴鍧� + EZSDK.IOS.EZSDK.SharedInstance().SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken); + EZSDK.IOS.EZSDK.SharedInstance().SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, DB_ResidenceData.Instance.CurrentRegion.id); + //2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK + EZSDK.IOS.EZSDK.SharedInstance().SetEZAccessToken(ezChildAccessToken); + //////3.鎵撳紑鎽勫儚澶磋澶囧垪琛ㄩ〉闈� + //EZSDK.IOS.EZSDK.SharedInstance().Go2EZvizMonitor(); + //EZSDK.IOS.EZDeviceInfo info = new EZSDK.IOS.EZDeviceInfo(); + //info.de + //EZSDK.IOS.EZSDK.Play(info); #else HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id); @@ -228,7 +250,7 @@ if (DB_ResidenceData.Instance.CurrentRegion.id == home.id || string.IsNullOrEmpty(home.id)) return; } -#endregion + #endregion /// <summary> /// 钀ょ煶瑙嗛闂ㄩ攣鐨勫浘鏍� @@ -246,7 +268,7 @@ } } -#region --------- 鍔熻兘鏂囦欢淇濆瓨锛屽垹闄� -------- + #region --------- 鍔熻兘鏂囦欢淇濆瓨锛屽垹闄� -------- /// <summary> /// 淇濆瓨鏈湴鏂囦欢 /// </summary> @@ -270,7 +292,7 @@ FunctionList.List.DeleteFunction(function); MainPage.Log($"鏂囦欢鍒犻櫎->{function.name}-->{function.spk}"); } -#endregion + #endregion /// <summary> /// 鑾峰彇Loading瀵硅薄 /// </summary> @@ -317,7 +339,7 @@ #endif return list; } -#region ---------鑷畾涔夌嚎绋�(瀛愮嚎绋嬶紝涓荤嚎绋�)-------- + #region ---------鑷畾涔夌嚎绋�(瀛愮嚎绋嬶紝涓荤嚎绋�)-------- /// <summary> /// 瀛愮嚎绋� /// </summary> @@ -359,8 +381,8 @@ }); } -#endregion -#region --------- 鎻愮ず妗嗭紝纭妗� -------- + #endregion + #region --------- 鎻愮ず妗嗭紝纭妗� -------- /// <summary> /// 瀵硅瘽妗�(鍙绋嬪簭鎶ラ敊鐨勬椂鍊欐墠鐢ㄥ埌) /// </summary> @@ -400,7 +422,7 @@ new PublicAssmebly().TipMsgAutoClose(msg, false, time * 1000); }); } -#endregion + #endregion /// <summary> /// 寮规绫诲瀷 /// </summary> @@ -422,9 +444,32 @@ } #if __IOS__ + ///// <summary> + ///// 涓撻棬瀹氫箟缁橧os鍥炶皟鐢ㄧ潃,娌℃湁鐗规畩鍚箟 + ///// </summary> + //public class IosIHdlInterface : Shared.IOS.HDLLinphoneSDK.HDLLinphoneCallDelegate + //{ + + // Action<bool, string> mAction; + // public IosIHdlInterface(Action<bool, string> action) + // { + // mAction = action; + // } + // /// <summary> + // /// + // /// </summary> + // /// <param name="p0">true鏄叆缃戞垚鍔�(婧愮敓鍥炶皟杩斿洖)</param> + // /// <param name="p1">璁惧鐨勫簭鍒楀寲(婧愮敓鍥炶皟杩斿洖)</param> + // public void AddCallback(bool p0, string p1) + // { + // mAction?.Invoke(p0, p1); + // } + + + //} #else /// <summary> - /// + /// 涓撻棬瀹氫箟缁欏畨鍗撳洖璋冪敤鐫�,娌℃湁鐗规畩鍚箟 /// </summary> public class AndroidIHdlInterface : Java.Lang.Object, IHdlInterface { @@ -451,5 +496,5 @@ } - + } diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs index 352d61c..b636f81 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs @@ -317,7 +317,7 @@ //瀹炴椂瑙嗛 this.rtvFL.SetClickListener((fl, btnStateImage, btnStateText) => { - CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk); + CommonMethod.Current.SkipRTVActivity(this.device.sid, this.device.deviceId, this.device.spk,false); }); //涓存椂瀵嗙爜 this.pswFL.SetClickListener((fl, btnStateImage, btnStateText) => -- Gitblit v1.8.0