From 6c8a978c08c17230bffcce69a76d5043253e808d Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期日, 29 九月 2024 11:37:52 +0800 Subject: [PATCH] 萤石门铃 --- HDL-ON_Android/Properties/AndroidManifest.xml | 2 +- HDL_ON/Common/HDLCommon.cs | 46 +++++++++++++++++++++++++++++++++++++++++----- HDL-ON_Android/Other/JPush/JPushReceiver.cs | 4 ++-- 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/HDL-ON_Android/Other/JPush/JPushReceiver.cs b/HDL-ON_Android/Other/JPush/JPushReceiver.cs index 745527d..d6404cf 100644 --- a/HDL-ON_Android/Other/JPush/JPushReceiver.cs +++ b/HDL-ON_Android/Other/JPush/JPushReceiver.cs @@ -53,7 +53,7 @@ /// <param name="notificationMessage"></param> public override void OnNotifyMessageOpened(Context context, NotificationMessage notificationMessage) { - MainPage.Log("鎺ユ敹鍒版帹閫�:鐐瑰嚮閫氱煡鍥炶皟"); + //MainPage.Log("鎺ユ敹鍒版帹閫�:鐐瑰嚮閫氱煡鍥炶皟"); OpenNotification(context, notificationMessage,true); } @@ -138,7 +138,7 @@ { try { - MainPage.Log("鎺ユ敹鍒版帹閫�:鎵撳紑娑堟伅鏄剧ず鐣岄潰"); + //MainPage.Log("鎺ユ敹鍒版帹閫�:鎵撳紑娑堟伅鏄剧ず鐣岄潰"); var pushMes = new JPushMessageInfo() { Title = notificationMessage.NotificationTitle, diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index bfc44a1..fc65e87 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.7.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409271"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.7.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409291"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <uses-permission android:name="android.permission.RECEIVE_SMS" /> <!--绋嬪簭鍙互璇诲彇璁惧澶栭儴瀛樺偍绌洪棿(鍐呯疆SDcard鍜屽缃甋DCard)鐨勬枃浠讹紝鎴戠殑鏂囦欢绛�--> diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs index 749d7df..8a0a362 100644 --- a/HDL_ON/Common/HDLCommon.cs +++ b/HDL_ON/Common/HDLCommon.cs @@ -353,7 +353,8 @@ } } } - catch (Exception ex) { + catch (Exception ex) + { MainPage.Log("Error", $"鑷爺鍙瀵硅閫氱煡寮傚父:{ex.StackTrace}"); } @@ -383,7 +384,7 @@ }) { IsBackground = true }.Start(); - #elif __IOS__ +#elif __IOS__ SoundPlayer.Ins.PlaySound(); new Thread(() => { int count = 0; @@ -417,7 +418,7 @@ } }) { IsBackground = true }.Start(); - #endif +#endif MainPage.Log("鎺ユ敹鍒版帹閫�:HDL Linphone 鐙勮�愬厠"); eSVideoInfo.HomeId = jpushMessageInfo.HomeId; @@ -459,11 +460,46 @@ } else if (jpushMessageInfo.messageType == (PushMessageType.DOOR_BELL.ToString())) { + try + { + var json = Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent); + string interphoneTypeEnum = json["interphoneTypeEnum"].ToString(); + if (string.IsNullOrEmpty(interphoneTypeEnum)) return; + ESVideoInfo eSVideoInfo = new ESVideoInfo(); + if (interphoneTypeEnum == InterphoneType.EZVIZ.ToString()) + { + eSVideoInfo.Lc_AccessToken = json["subToken"].ToString();//"瀛愯处鍙穞oken + eSVideoInfo.DeviceSerial = json["devSerial"].ToString();//璁惧搴忓垪鍙� + eSVideoInfo.Lc_DeviceId = json["deviceId"].ToString(); + eSVideoInfo.spk = json["spk"].ToString(); + if (eSVideoInfo.spk == SPK.Peephole) + { + eSVideoInfo.HomeId = jpushMessageInfo.HomeId; + if (json.ContainsKey("msgId") && !string.IsNullOrEmpty(json["msgId"].ToString())) + { + eSVideoInfo.msgId = json["msgId"].ToString(); + } + if (json.ContainsKey("currentTime") && !string.IsNullOrEmpty(json["currentTime"].ToString())) + { + eSVideoInfo.currentTime = json["currentTime"].ToString(); + } + + if (eSVideoInfo != null) + { + //鎵撳紑鍛煎彨椤甸潰 + ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo, interphoneTypeEnum); + return; + } + } + } + } + catch (Exception ex) + { + MainPage.Log("Error", $"缁撴潫闂ㄩ搩鎺ㄩ�佹暟鎹紓甯�:{ex.Message}"); + } //钀ょ煶闂ㄩ攣鎺ㄩ�� HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DoorLockPush(jpushMessageInfo); } - - } } catch (Exception EX) -- Gitblit v1.8.0