From c8dfa6df784741900a4c06918929d3db3c876234 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 16 七月 2021 10:40:56 +0800
Subject: [PATCH] Merge branch 'hxb-test' into wxr7-ez
---
HDL-ON_Android/HDL-ON_Android.csproj | 12 +
ys/Jars/app-release.aar | 0
HDL_ON/DAL/Server/NewAPI.cs | 2
HDL_ON/Common/HDLCommon.cs | 81 ++++++++++-----
HDL_ON/Common/ApiUtlis.cs | 2
HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs | 16 +-
HDL_ON/DAL/Server/HttpServerRequest.cs | 3
DLL/IOS/EZSDK.IOS.dll | 0
HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard | 17 ++
DLL/EZvizMonitor/ys.dll | 0
HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs | 110 ++++++++++++++++-----
11 files changed, 173 insertions(+), 70 deletions(-)
diff --git a/DLL/EZvizMonitor/ys.dll b/DLL/EZvizMonitor/ys.dll
index 55f39ab..a14d06b 100644
--- a/DLL/EZvizMonitor/ys.dll
+++ b/DLL/EZvizMonitor/ys.dll
Binary files differ
diff --git a/DLL/IOS/EZSDK.IOS.dll b/DLL/IOS/EZSDK.IOS.dll
index fdc491c..fb2f1f7 100644
--- a/DLL/IOS/EZSDK.IOS.dll
+++ b/DLL/IOS/EZSDK.IOS.dll
Binary files differ
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index 6511e92..0ee0e6b 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -151,11 +151,11 @@
<Reference Include="Square.OkIO">
<HintPath>..\DLL\EZvizMonitor\Square.OkIO.dll</HintPath>
</Reference>
- <Reference Include="ys">
- <HintPath>..\DLL\EZvizMonitor\ys.dll</HintPath>
- </Reference>
<Reference Include="LC_SDK">
<HintPath>..\DLL\LC\Android\LC_SDK.dll</HintPath>
+ </Reference>
+ <Reference Include="ys">
+ <HintPath>..\DLL\EZvizMonitor\ys.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -1326,6 +1326,12 @@
<ItemGroup>
<Folder Include="Assets\Phone\FunctionIcon\IrFan\" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\ys\ys.csproj">
+ <Project>{DF065E3F-C3A1-4908-9582-000974B7C290}</Project>
+ <Name>ys</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
diff --git a/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard b/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard
index 284eeed..bba85b8 100644
--- a/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard
+++ b/HDL-ON_iOS/Resources/EZ/Base.lproj/AddDevice.storyboard
@@ -2,7 +2,6 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="1Qq-y9-5Vr">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
- <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -686,9 +685,21 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Q0X-wy-A5B">
<rect key="frame" x="47.5" y="362" width="311.5" height="40"/>
<attributedString key="attributedText">
- <fragment content="杩斿洖demo锛岀瓑寰呬笌璁惧杩炴帴锛屾垚鍔熷悗鑷姩杩涘叆涓嬩竴姝ユ搷浣溿��">
+ <fragment content="杩斿洖">
+ <attributes>
+ <font key="NSFont" size="14" name=".PingFangSC-Regular"/>
+ <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" minimumLineHeight="20" tighteningFactorForTruncation="0.0"/>
+ </attributes>
+ </fragment>
+ <fragment content="APP">
<attributes>
<font key="NSFont" metaFont="system" size="14"/>
+ <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" minimumLineHeight="20" tighteningFactorForTruncation="0.0"/>
+ </attributes>
+ </fragment>
+ <fragment content="锛岀瓑寰呬笌璁惧杩炴帴锛屾垚鍔熷悗鑷姩杩涘叆涓嬩竴姝ユ搷浣溿��">
+ <attributes>
+ <font key="NSFont" size="14" name=".PingFangSC-Regular"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" minimumLineHeight="20" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
@@ -914,7 +925,7 @@
</scenes>
<inferredMetricsTieBreakers>
<segue reference="9TP-S2-hhI"/>
- <segue reference="MFl-yy-ZsP"/>
+ <segue reference="9Lc-Kx-oZS"/>
<segue reference="ikM-Zn-H8f"/>
</inferredMetricsTieBreakers>
<resources>
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 26204e8..b5eb5bb 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -271,7 +271,7 @@
foreach (var video in FunctionList.List.videoIntercom)
{
- if (video.interphoneType == "IMOUVISIAL")
+ if (video.interphoneType == InterphoneType.IMOUVISIAL.ToString())
{
UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken = video.subAccountToken;
}
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index d7de09c..77ed877 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -273,7 +273,7 @@
if (jpushMessageInfo.messageType.Contains(PushMessageType.Alarm.ToString()))
{
//鎶ヨ鎺ㄩ�佸脊绐楁彁绀�
- ShowAlarmPushMessage(jpushMessageInfo,true);
+ ShowAlarmPushMessage(jpushMessageInfo, true);
}
else if (jpushMessageInfo.messageType.Contains(PushMessageType.FLCall.ToString()))
{
@@ -295,7 +295,7 @@
eSVideoInfo.ESVideoUUID = eSVideoInfo.uuid;
}
- ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo, "FLVI");
+ ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo, InterphoneType.FLVI.ToString());
}
else if (jpushMessageInfo.messageType.Contains(PushMessageType.HDL_INTERPHONE.ToString()))
@@ -303,39 +303,56 @@
if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return;
//瀛楁鍏煎闂锛屽彧鑳界洿鎺ュ彇鍊间簡
- var json= Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent);
+ var json = Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent);
+ //1.瑙嗗璁插巶瀹剁被鍨�
+ string interphoneTypeEnum = json["interphoneTypeEnum"].ToString();
+ if (string.IsNullOrEmpty(interphoneTypeEnum)) return;
+ //
ESVideoInfo eSVideoInfo = new ESVideoInfo();// GetESOnVideoJson(jpushMessageInfo.expantContent);
- eSVideoInfo.callId = json["callId"].ToString();
- //eSVideoInfo.Lc_AccessToken = UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken;//json["subAccountToken"].ToString();//
- eSVideoInfo.Lc_AccessToken = json["subAccountToken"].ToString();//2021-05-13 鐩墠浜戠杩樻病鎷垮埌Lc_AccessToken锛岀洰鍓嶆病鍔炴硶姝e父浣跨敤
- 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();
+ //2.鏍规嵁鍙瀵硅鍘傚绫诲瀷锛屽鐞嗕笉鍚岀殑鏁版嵁
+ if (interphoneTypeEnum == InterphoneType.IMOUVISIAL.ToString())
+ {
+ //澶у崕涔愭
+ eSVideoInfo.callId = json["callId"].ToString();
+ //eSVideoInfo.Lc_AccessToken = UI.UI2.PersonalCenter.PirDevice.PirSend.LcSubAccessToken;//json["subAccountToken"].ToString();//
+ eSVideoInfo.Lc_AccessToken = json["subAccountToken"].ToString();//2021-05-13 鐩墠浜戠杩樻病鎷垮埌Lc_AccessToken锛岀洰鍓嶆病鍔炴硶姝e父浣跨敤
+ 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();
+ }
+ else if (interphoneTypeEnum == InterphoneType.EZVIZ.ToString())
+ {
+ //钀ょ煶鐚溂
+ eSVideoInfo.Lc_AccessToken = json["subToken"].ToString();//"瀛愯处鍙穞oken
+ eSVideoInfo.DeviceSerial = json["devSerial"].ToString();//璁惧搴忓垪鍙�
+ eSVideoInfo.HomeId = jpushMessageInfo.HomeId;
+ }
+ //3.鎵撳紑鍛煎彨椤甸潰
if (eSVideoInfo == null) return;
-
- ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo, "IMOUVISIAL");
+ ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo, interphoneTypeEnum);
}
- else if(jpushMessageInfo.messageType.Contains(PushMessageType.Prompt.ToString()))
+ else if (jpushMessageInfo.messageType.Contains(PushMessageType.Prompt.ToString()))
{
ShowAlarmPushMessage(jpushMessageInfo, false);
}
}
}
- catch(Exception EX)
+ catch (Exception EX)
{
Utlis.WriteLine("catch: " + EX.ToString());
}
}
-
- /// <summary>
- /// 瑙f瀽涓版灄鍙瀵硅鎺ㄩ�佹暟鎹�
- /// </summary>
- /// <param name="jsonStr"></param>
- /// <returns></returns>
- ESVideoInfo GetESOnVideoJson(string jsonStr)
+ //{"code":0,"data":{"list":[{"createTime":"1625798305115","modifyTime":"1625798305115","region":"100000000000000001","id":"1413326644794294273","alarmId":"20210709103818-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709103818-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:38:17","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{"createTime":"1625798057197","modifyTime":"1625798057197","region":"100000000000000001","id":"1413325604946640898","alarmId":"20210709103413-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709103413-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:34:12","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625797973320","modifyTime":"1625797973320","region":"100000000000000001","id":"1413325253141004289","alarmId":"20210709103236-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709103236-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:32:31","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625797782136","modifyTime":"1625797782136","region":"100000000000000001","id":"1413324451261382658","alarmId":"20210709102937-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709102937-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:29:37","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625797668771","modifyTime":"1625797668771","region":"100000000000000001","id":"1413323975769915394","alarmId":"20210709102743-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709102743-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:27:42","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625797539846","modifyTime":"1625797539846","region":"100000000000000001","id":"1413323435023466498","alarmId":"20210709102534-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709102534-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:25:34","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625797530627","modifyTime":"1625797530627","region":"100000000000000001","id":"1413323396351983618","alarmId":"20210709102525-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709102525-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:25:25","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625796028089","modifyTime":"1625796028089","region":"100000000000000001","id":"1413317094255034369","alarmId":"20210709100024-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709100024-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T10:00:23","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625795974558","modifyTime":"1625795974558","region":"100000000000000001","id":"1413316869729746946","alarmId":"20210709095931-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709095931-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T09:59:31","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"},{ "createTime":"1625795966933","modifyTime":"1625795966933","region":"100000000000000001","id":"1413316837748178946","alarmId":"20210709095923-F41014762-1-10000","channelNo":1,"deviceSerial":"F41014762","alarmName":"浜轰綋鎰熷簲浜嬩欢","alarmPicUrl":"https://i.ys7.com/streamer/alarm/url/get?fileId=20210709095923-F41014762-1-10000-2-1&deviceSerialNo=F41014762&cn=1&isEncrypted=0&isCloudStored=0&ct=1&lc=7&bn=1_hikalarm&isDevVideo=0","alarmTime":"2021-07-09T09:59:22","homeId":"1396717478877241345","alarmType":"pir","isChecked":0,"isEncrypt":0,"deleted":0,"tenantId":"20"}],"totalCount":"13","totalPage":"2","pageNo":"1","pageSize":"10"},"timestamp":"1625807415164","isSuccess":true}
+ //{"platform":"1","timestamp":"1625805660249","appKey":"HDL-HOME-APP-TEST","sign":"02e433c40485b30451ebdc5ca3cd959c","deviceSerial":"F41014762","homeId":"1396717478877241345"}
+ /// <summary>
+ /// 瑙f瀽涓版灄鍙瀵硅鎺ㄩ�佹暟鎹�
+ /// </summary>
+ /// <param name="jsonStr"></param>
+ /// <returns></returns>
+ ESVideoInfo GetESOnVideoJson(string jsonStr)
{
try
{
@@ -436,7 +453,7 @@
/// </summary>
/// <param name="jpushMessageInfo"></param>
/// <param name="isAlarm">鏄惁鏄姤璀︿俊鎭紝锛堝姞杞界殑寮圭獥棰滆壊涓嶄竴鏍凤級</param>
- public void ShowAlarmPushMessage(JPushMessageInfo jpushMessageInfo,bool isAlarm)
+ public void ShowAlarmPushMessage(JPushMessageInfo jpushMessageInfo, bool isAlarm)
{
//娌$櫥褰曚笉澶勭悊
if (UserInfo.Current == null || !UserInfo.Current.IsLogin || MainPage.BasePageView == null)
@@ -600,10 +617,12 @@
var result = new HttpServerRequest().EZGetChildToken();
if (result.Code == StateCode.SUCCESS)
{
- var ezChildAccessToken = Newtonsoft.Json.JsonConvert.DeserializeObject<EZChildAccessToken>(result.Data.ToString());
+ var ezChildAccessToken = result.Data.ToString();
+
+ //var ezChildAccessToken = Newtonsoft.Json.JsonConvert.DeserializeObject<EZChildAccessToken>(result.Data.ToString());
Application.RunOnMainThread(() =>
{
- if (!string.IsNullOrEmpty(ezChildAccessToken.accessToken))
+ if (!string.IsNullOrEmpty(ezChildAccessToken))
{
#if __IOS__
//iOS
@@ -611,12 +630,15 @@
EZSDK.IOS.EZSDK.InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
//1.璁剧疆鎵�闇�娌充笢鐨凙ccessToken鍜孯efreshToken銆佸煙鍚嶅湴鍧�
EZSDK.IOS.EZSDK.SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken);
- EZSDK.IOS.EZSDK.SetRequestHttpsHost(OnAppConfig.Instance.RequestHttpsHost);
+ EZSDK.IOS.EZSDK.SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, DB_ResidenceData.Instance.CurrentRegion.id);
//2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK
- EZSDK.IOS.EZSDK.SetEZAccessToken(ezChildAccessToken.accessToken);
- //3.鎵撳紑鎽勫儚澶磋澶囧垪琛ㄩ〉闈�
+ EZSDK.IOS.EZSDK.SetEZAccessToken(ezChildAccessToken);
+ ////3.鎵撳紑鎽勫儚澶磋澶囧垪琛ㄩ〉闈�
EZSDK.IOS.EZSDK.Go2EZvizMonitor();
+ //EZSDK.IOS.EZDeviceInfo info = new EZSDK.IOS.EZDeviceInfo();
+ //info.de
+ //EZSDK.IOS.EZSDK.Play(info);
#else
//Android
//1.璁剧疆鎵�闇�娌充笢鐨則oken銆佸煙鍚嶅湴鍧�
@@ -629,9 +651,12 @@
Android.Content.Intent intent = new Android.Content.Intent();
var bundle = new Android.OS.Bundle();
//浼犻�抧ame鍙傛暟涓簍inyphp
- bundle.PutString("Token", ezChildAccessToken.accessToken);
+ 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);
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index c32ca0c..ceee580 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -2469,10 +2469,13 @@
#region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________
/// <summary>
/// 娌充笢鑾峰彇钀ょ煶浜戝瓙璐﹀彿token鐨勬帴鍙�
+ /// 2021-07-07 鏂版柟妗堟帴鍙h皟鏁村鎺�
/// </summary>
public ResponsePackNew EZGetChildToken()
{
Dictionary<string, object> d = new Dictionary<string, object>();
+ d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+ d.Add("platform", "1");
var requestJson = HttpUtil.GetSignRequestJson(d);
return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson);
}
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index bd27310..40200dd 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -599,7 +599,7 @@
/// <summary>
/// 娌充笢鑾峰彇钀ょ煶浜戝瓙璐﹀彿token鐨勬帴鍙�
/// </summary>
- public const string API_POST_EZ_GetChildToken = "/home-wisdom/platform/childToken";
+ public const string API_POST_EZ_GetChildToken = "/home-wisdom/platform/yingshi/child/token";
#endregion
diff --git a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
index b6ad254..aa8353d 100644
--- a/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
+++ b/HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -4,6 +4,7 @@
using System.Threading;
using System.Collections.Generic;
using HDL_ON.UI.UI2.PersonalCenter.PirDevice;
+using HDL_ON.Entity;
#if __IOS__
using Shared.IOS.ESVideoOnSDK;
@@ -66,7 +67,7 @@
int.TryParse(mESVideoInfo.roomno, out roomID);
#if __IOS__
- if (interphoneType == "IMOUVISIAL")
+ if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
{
//涔愭鍙瀵硅
//1.鍒濆鍖朙COpenSDK_Api
@@ -95,7 +96,7 @@
}
#else
Intent intent = null;
- if (interphoneType == "IMOUVISIAL")
+ if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
{
intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
}
@@ -136,7 +137,7 @@
int roomID = 0;
int.TryParse(mESVideoInfo.roomno, out roomID);
#if __IOS__
- if (interphoneType == "IMOUVISIAL")
+ if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
{
//涔愭鍙瀵硅
//1.鍒濆鍖朙COpenSDK_Api
@@ -152,6 +153,21 @@
vc.MLCCallDelegate = mOnLCCallDelegate;
//vc.MLCCallDelegate = new OnLCCallDelegate(this);
Shared.Application.currentVC.NavigationController.PushViewController(vc, true);
+ }
+ else if (interphoneType == InterphoneType.EZVIZ.ToString())
+ {
+ //钀ょ煶鐚溂鍛煎彨
+ //鍒濆鍖栬悿鐭充簯SDK锛屼腑鏂囧浗鍐卥ey銆佽嫳鏂囨捣澶杒ey 寮�鍙戣�呰处鍙蜂娇鐢ㄥ簲鐢ㄥ寘鍚嶇敵璇风殑APPKEY锛屼笉鍚屽寘鍚嶅簲鐢ㄩ渶閰嶇疆涓嶅悓鐨凙PPKEY
+ EZSDK.IOS.EZSDK.InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
+ //1.璁剧疆鎵�闇�娌充笢鐨凙ccessToken鍜孯efreshToken銆佸煙鍚嶅湴鍧�
+ EZSDK.IOS.EZSDK.SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken);
+
+ EZSDK.IOS.EZSDK.SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, mESVideoInfo.HomeId);
+ //2.璁剧疆钀ょ煶瀛愯处鍙风殑AccessToken鍒癝DK
+ EZSDK.IOS.EZSDK.SetEZAccessToken(mESVideoInfo.Lc_AccessToken);
+ //3.鎵撳紑瑙嗛鎾斁椤甸潰
+ EZSDK.IOS.EZSDK.PlayWithDeviceSerial(mESVideoInfo.DeviceSerial);
+
}
else
{
@@ -170,9 +186,32 @@
#region
Intent intent = null;
- if (interphoneType == "IMOUVISIAL")
+ if (interphoneType == InterphoneType.IMOUVISIAL.ToString())
{
intent = new Intent(Shared.Application.Activity, typeof(HDL_ON_Android.LeChengVideoActivity));
+ }
+ else if (interphoneType == InterphoneType.EZVIZ.ToString())
+ {
+ ((BaseActivity)Shared.Application.Activity).SetCamera(b =>
+ {
+ if (b)
+ {
+ intent = new Android.Content.Intent();
+ var bundle = new Android.OS.Bundle();
+ //浼犻�抧ame鍙傛暟涓簍inyphp
+ bundle.PutString("EzChildAccessToken", mESVideoInfo.Lc_AccessToken);
+ bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString);
+ bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost);
+ bundle.PutString("EzvizAppKey", "1aa98a90489b4838b966b57018b4b04b");
+ bundle.PutInt("Platform", 1);
+ bundle.PutString("HomeId", mESVideoInfo.HomeId);
+ bundle.PutString("DeviceSerial", mESVideoInfo.DeviceSerial);
+ intent.PutExtras(bundle);
+ intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity"));
+ Shared.Application.Activity.StartActivity(intent);
+ }
+ });
+ return;
}
else
{
@@ -598,31 +637,33 @@
}
#endregion
+
+
#endif
- /// <summary>
- /// 娴嬭瘯鏂规硶
- /// </summary>
- /// <param name="isMonitor"></param>
- public void Test(bool isMonitor = true)
- {
- ESVideoInfo eSVideoInfo = new ESVideoInfo()
- {
- DeviceName = "瀹ゅ鏈�88",
- ESVideoUUID = "JJY000019VPLLF",
+ ///// <summary>
+ ///// 娴嬭瘯鏂规硶
+ ///// </summary>
+ ///// <param name="isMonitor"></param>
+ //public void Test(bool isMonitor = true)
+ //{
+ // ESVideoInfo eSVideoInfo = new ESVideoInfo()
+ // {
+ // DeviceName = "瀹ゅ鏈�88",
+ // ESVideoUUID = "JJY000019VPLLF",
- };
- if (isMonitor)
- {
- ShowESVideoMonitor(eSVideoInfo, "");
- }
- else
- {
- eSVideoInfo.callId = "88888";
- ShowESvideoVideoIntercom(eSVideoInfo, "");
- }
+ // };
+ // if (isMonitor)
+ // {
+ // ShowESVideoMonitor(eSVideoInfo, "");
+ // }
+ // else
+ // {
+ // eSVideoInfo.callId = "88888";
+ // ShowESvideoVideoIntercom(eSVideoInfo, "");
+ // }
- }
+ //}
}
/// <summary>
@@ -667,9 +708,9 @@
//========================澶у崕==========================
-
/// <summary>
/// 璐﹀彿accessToken
+ /// 钀ょ煶瀛愯处鍙稵oken涔熷叡鐢ㄨ繖涓瓧娈�
/// </summary>
public string Lc_AccessToken = string.Empty;
@@ -692,6 +733,17 @@
/// 璐﹀彿鏍囪锛�0鍥藉唴锛�1鍥藉锛涘浗鍐呭浗澶栬闂兘鍦板潃涓嶄竴鏍�
/// </summary>
public int Lc_Location = 0;
+
+ //========================钀ょ煶浜戠尗鐪�==========================
+ /// <summary>
+ /// 浣忓畢Id
+ /// </summary>
+ public string HomeId = string.Empty;
+ /// <summary>
+ /// 璁惧搴忓垪鍙�
+ /// </summary>
+ public string DeviceSerial = string.Empty;
+
}
@@ -728,5 +780,11 @@
/// 澶у崕鍙瀵硅骞冲彴
/// </summary>
IMOUVISIAL,
+ /// <summary>
+ /// 钀ょ煶鐚溂鍛煎彨
+ /// </summary>
+ EZVIZ,
+
+
}
}
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
index 0b26a18..fa1831f 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs
@@ -72,15 +72,15 @@
bodyView.AddChidren(btnOnTitle);
#if DEBUG
- btnOnIcon.MouseUpEventHandler += (sender, e) =>
- {
- ESOnVideo.Current.Test();
- };
+ //btnOnIcon.MouseUpEventHandler += (sender, e) =>
+ //{
+ // ESOnVideo.Current.Test();
+ //};
- btnOnTitle.MouseUpEventHandler += (sender, e) =>
- {
- ESOnVideo.Current.Test(false);
- };
+ //btnOnTitle.MouseUpEventHandler += (sender, e) =>
+ //{
+ // ESOnVideo.Current.Test(false);
+ //};
#endif
diff --git a/ys/Jars/app-release.aar b/ys/Jars/app-release.aar
index f612de8..8277f9d 100644
--- a/ys/Jars/app-release.aar
+++ b/ys/Jars/app-release.aar
Binary files differ
--
Gitblit v1.8.0