From 9c33e4ccb90fae87a614abd2ed1ab034d3b7a13d Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 26 三月 2021 11:26:01 +0800 Subject: [PATCH] 2021-03-26 1.对接接口优化。 --- DLL/FL/iOS/Shared.IOS.ESVideoOnSDK.dll | 0 HDL_ON/DAL/Server/NewAPI.cs | 2 HDL-ON_iOS/HDL-ON_iOS.csproj | 2 .vs/HDL_APP_Project/xs/UserPrefs.xml | 39 +++---------------- HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs | 73 ++++++++++++++++++++++++------------ HDL_ON/HDL_ON.projitems | 4 +- 6 files changed, 60 insertions(+), 60 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 94c1796..f5fe4fb 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,15 +1,8 @@ 锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" /> - <MonoDevelop.Ide.Workbench ActiveDocument="HDL-ON_iOS/AppDelegate.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs"> <Files> - <File FileName="HDL-ON_Android/Other/JLCountrycode.cs" Line="40" Column="1" /> - <File FileName="HDL_ON/Common/HDLCommon.cs" Line="412" Column="42" /> - <File FileName="HDL_ON/DAL/FL/ESOnVideo.cs" /> - <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs" /> - <File FileName="HDL_ON/DAL/Server/NewApiRes.cs" Line="1462" Column="18" /> - <File FileName="HDL_ON/DAL/Server/NewAPI.cs" Line="23" Column="22" /> - <File FileName="HDL-ON_Android/Other/JPush/JPushReceiver.cs" Line="166" Column="75" /> - <File FileName="HDL-ON_iOS/AppDelegate.cs" Line="320" Column="39" /> + <File FileName="HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs" Line="16" Column="1" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -18,26 +11,11 @@ <Node name="HDL_ON" expanded="True"> <Node name="Common" expanded="True" /> <Node name="DAL" expanded="True"> - <Node name="Server" expanded="True" /> + <Node name="ThirdPartySdk" expanded="True"> + <Node name="ESOnVideo.cs" selected="True" /> + </Node> </Node> - <Node name="Entity" expanded="True" /> - <Node name="UI" expanded="True"> - <Node name="1-test-" expanded="True" /> - <Node name="BindingResidence" expanded="True" /> - <Node name="CSS" expanded="True" /> - <Node name="UI0-Public" expanded="True" /> - <Node name="UI0-Stan" expanded="True" /> - <Node name="UI1-Login" expanded="True" /> - <Node name="UI2" expanded="True" /> - </Node> - </Node> - <Node name="HDL-ON_Android" expanded="True"> - <Node name="Other" expanded="True"> - <Node name="JPush" expanded="True" /> - </Node> - </Node> - <Node name="HDL-ON_iOS" expanded="True"> - <Node name="AppDelegate.cs" selected="True" /> + <Node name="UI" expanded="True" /> </Node> </Node> </State> @@ -53,10 +31,7 @@ <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.Android_Accelerated_Oreo" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> - <BreakpointStore> - <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/ON+/HDL_ON/Common/HDLCommon.cs" relfile="HDL_ON/Common/HDLCommon.cs" line="298" column="1" /> - <Breakpoint file="/Users/jlchen/JLChen/ProjectsCode/HDLGit/ON+/HDL_ON/Common/HDLCommon.cs" relfile="HDL_ON/Common/HDLCommon.cs" line="284" column="1" /> - </BreakpointStore> + <BreakpointStore /> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> </Properties> \ No newline at end of file diff --git a/DLL/FL/iOS/Shared.IOS.ESVideoPhoneSDK.dll b/DLL/FL/iOS/Shared.IOS.ESVideoOnSDK.dll similarity index 99% rename from DLL/FL/iOS/Shared.IOS.ESVideoPhoneSDK.dll rename to DLL/FL/iOS/Shared.IOS.ESVideoOnSDK.dll index 173262f..7bda3d7 100644 --- a/DLL/FL/iOS/Shared.IOS.ESVideoPhoneSDK.dll +++ b/DLL/FL/iOS/Shared.IOS.ESVideoOnSDK.dll Binary files differ diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index 7952804..508b7da 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -94,7 +94,7 @@ <HintPath>..\DLL\IOS\EZSDK.IOS.dll</HintPath> </Reference> <Reference Include="Shared.IOS.ESVideoOnSDK"> - <HintPath>..\..\ESVideoPhoneSDKProject\On+\xamarin\Shared.IOS.ESVideoOnSDK\Shared.IOS.ESVideoOnSDK\bin\Release\Shared.IOS.ESVideoOnSDK.dll</HintPath> + <HintPath>..\DLL\FL\iOS\Shared.IOS.ESVideoOnSDK.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs index e7694be..a672f0b 100644 --- a/HDL_ON/DAL/Server/NewAPI.cs +++ b/HDL_ON/DAL/Server/NewAPI.cs @@ -547,7 +547,7 @@ /// </summary> public const string API_POST_FL_Screenshot = "/home-wisdom/app/fl/vi/screenshot"; /// <summary> - /// 閫氳瘽瑙嗛鎴浘涓婁紶 + /// 鎸傛柇 /// </summary> public const string API_POST_FL_HangUp = "/home-wisdom/app/fl/vi/hang-up"; /// <summary> diff --git a/HDL_ON/DAL/FL/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs similarity index 81% rename from HDL_ON/DAL/FL/ESOnVideo.cs rename to HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs index e9a5cf2..6b310f0 100644 --- a/HDL_ON/DAL/FL/ESOnVideo.cs +++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs @@ -8,6 +8,9 @@ using Shared.IOS.ESVideoOnSDK; using UIKit; using Foundation; +#else + +using Android.Content; #endif @@ -68,6 +71,17 @@ Shared.Application.currentVC.NavigationController.PushViewController(vc, true); #else + Intent intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity)); + intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID); + intent.PutExtra("uuid", mESVideoInfo.uuid); + intent.PutExtra("DeviceName", mESVideoInfo.DeviceName); + intent.PutExtra("cmtID", mESVideoInfo.cmtID); + intent.PutExtra("roomno", mESVideoInfo.roomno); + intent.PutExtra("unitno", mESVideoInfo.unitno); + intent.PutExtra("HomeID", mESVideoInfo.HomeID); + intent.PutExtra("callId", mESVideoInfo.callId); + intent.PutExtra("Type", 0); + Shared.Application.Activity.StartActivity(intent); #endif } @@ -93,6 +107,17 @@ Shared.Application.currentVC.NavigationController.PushViewController(vc, true); #else + Intent intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.VideoActivity)); + intent.PutExtra("ESVideoUUID", mESVideoInfo.ESVideoUUID); + intent.PutExtra("uuid", mESVideoInfo.uuid); + intent.PutExtra("DeviceName", mESVideoInfo.DeviceName); + intent.PutExtra("cmtID", mESVideoInfo.cmtID); + intent.PutExtra("roomno", mESVideoInfo.roomno); + intent.PutExtra("unitno", mESVideoInfo.unitno); + intent.PutExtra("HomeID", mESVideoInfo.HomeID); + intent.PutExtra("callId", mESVideoInfo.callId); + intent.PutExtra("Type", 1); + Shared.Application.Activity.StartActivity(intent); #endif } @@ -105,13 +130,7 @@ /// <returns></returns> bool CheckESVideoInfoIsNullOrEmpty() { - if(esVideoInfo == null || string.IsNullOrEmpty(esVideoInfo.callId)) - { - Utlis.WriteLine("ESVideoInfo Is NullOrEmpty"); - return true; - } - return false; - //return (esVideoInfo == null || string.IsNullOrEmpty(esVideoInfo.callId)); + return (esVideoInfo == null || string.IsNullOrEmpty(esVideoInfo.callId)); } /// <summary> @@ -119,7 +138,7 @@ /// </summary> void AnswerAction() { - Utlis.WriteLine("AnswerAction"); + //Utlis.WriteLine("AnswerAction"); if (CheckESVideoInfoIsNullOrEmpty()) return; @@ -129,7 +148,7 @@ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_FL_Answer, requestJson); if (revertObj.Code == StateCode.SUCCESS) { - Utlis.WriteLine("POST 鎺ュ惉鎴愬姛"); + //Utlis.WriteLine("POST 鎺ュ惉鎴愬姛"); } else { @@ -147,7 +166,7 @@ /// <param name="callDuration"></param> void HangUpAction(int callDuration) { - Utlis.WriteLine("HangUpAction :" + callDuration); + //Utlis.WriteLine("HangUpAction :" + callDuration); if (CheckESVideoInfoIsNullOrEmpty()) return; @@ -161,7 +180,7 @@ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_FL_HangUp, requestJson); if (revertObj.Code == StateCode.SUCCESS) { - Utlis.WriteLine("POST 鎸傛柇鎴愬姛"); + //Utlis.WriteLine("POST 鎸傛柇鎴愬姛"); } else { @@ -177,7 +196,7 @@ /// </summary> void RejectCallAction() { - Utlis.WriteLine("RejectCallAction"); + //Utlis.WriteLine("RejectCallAction"); if (CheckESVideoInfoIsNullOrEmpty()) return; @@ -190,7 +209,7 @@ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_FL_Reject, requestJson); if (revertObj.Code == StateCode.SUCCESS) { - Utlis.WriteLine("POST 鎷掓帴鎴愬姛"); + //Utlis.WriteLine("POST 鎷掓帴鎴愬姛"); } else { @@ -206,23 +225,27 @@ /// </summary> void ScreenshotSuccessfulAction(byte[] dataBytes) { - Utlis.WriteLine("ScreenshotSuccessfulAction"); + //Utlis.WriteLine("ScreenshotSuccessfulAction"); if (CheckESVideoInfoIsNullOrEmpty()) return; new Thread(() => { - var imageName = Guid.NewGuid().ToString(); + //var imageName = Guid.NewGuid().ToString(); Dictionary<string, object> dic = new Dictionary<string, object>(); dic.Add("callId", esVideoInfo.callId); dic.Add("images", dataBytes); - dic.Add("imagesName", "FL" + imageName + "_ios.jpg"); +#if __IOS__ + dic.Add("imagesName", "_IOS.jpg"); +#else + dic.Add("imagesName", "_Android.jpg"); +#endif var requestJson = HttpUtil.GetSignRequestJson(dic); var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_FL_Screenshot, requestJson); if (revertObj.Code == StateCode.SUCCESS) { - Utlis.WriteLine("POST 鎴浘涓婁紶鎴愬姛"); + //Utlis.WriteLine("POST 鎴浘涓婁紶鎴愬姛"); } else { @@ -240,18 +263,20 @@ /// </summary> void UnlockAction() { - Utlis.WriteLine("UnlockAction"); + //Utlis.WriteLine("UnlockAction"); if (CheckESVideoInfoIsNullOrEmpty()) return; //3S鍐呬笉鍏佽瑙﹀彂绗簩娆� if(UnlockDateTime.AddSeconds(3) > DateTime.Now) { - UnlockDateTime = DateTime.Now; + Utlis.WriteLine("3S鍐呬笉鍏佽瑙﹀彂绗簩娆�"); //涓版灄SDKbug锛屽懠鍙殑鏃跺�欏紑閿佹垚鍔熶細鏈�2娆″洖璋冿紝 return; } + + UnlockDateTime = DateTime.Now; new Thread(() => { @@ -262,7 +287,7 @@ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_FL_Unlock, requestJson); if (revertObj.Code == StateCode.SUCCESS) { - Utlis.WriteLine("POST 寮�閿佹垚鍔�"); + //Utlis.WriteLine("POST 寮�閿佹垚鍔�"); } else { @@ -273,10 +298,10 @@ { IsBackground = false }.Start(); } - #endregion +#endregion #if __IOS__ - #region OnESCallDelegate +#region OnESCallDelegate /////// <summary> /////// OnESCallDelegate 缁ф壙鍝嶅簲浜嬩欢 /////// </summary> @@ -344,7 +369,7 @@ } - #endregion +#endregion #endif /// <summary> @@ -386,7 +411,7 @@ /// 瀹ゅ鏈虹殑鍚嶇О /// 渚嬶細瀹ゅ鏈� /// </summary> - public string DeviceName = "闂ㄥ彛鏈�"; + public string DeviceName = "瀹ゅ鏈�"; /// <summary> /// 涓版灄璇锋眰鐨勫敮涓�id /// </summary> diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems index 8675109..3b1bad9 100644 --- a/HDL_ON/HDL_ON.projitems +++ b/HDL_ON/HDL_ON.projitems @@ -360,7 +360,7 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Matching.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\PirNameView.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\BrandListPage.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)DAL\FL\ESOnVideo.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)DAL\ThirdPartySdk\ESOnVideo.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)UI\" /> @@ -400,6 +400,6 @@ <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\ArmSensor\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\" /> - <Folder Include="$(MSBuildThisFileDirectory)DAL\FL\" /> + <Folder Include="$(MSBuildThisFileDirectory)DAL\ThirdPartySdk\" /> </ItemGroup> </Project> -- Gitblit v1.8.0