From c2b68b777ddd4d9733e3bd64746929295c04ec45 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 10 八月 2020 11:53:45 +0800
Subject: [PATCH] 2020-08-10-1

---
 ZigbeeApp/GateWay.Droid/Application.cs |   50 +++++++++++++-------------------------------------
 1 files changed, 13 insertions(+), 37 deletions(-)

diff --git a/ZigbeeApp/GateWay.Droid/Application.cs b/ZigbeeApp/GateWay.Droid/Application.cs
index 8928f90..96899e7 100644
--- a/ZigbeeApp/GateWay.Droid/Application.cs
+++ b/ZigbeeApp/GateWay.Droid/Application.cs
@@ -247,6 +247,12 @@
         /// <param name="bundle">Bundle.</param>
         private void OpenNotification(Context context, Bundle bundle)
         {
+
+            Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class);
+            i.PutExtras(bundle);
+            i.SetFlags(ActivityFlags.NewTask);
+            context.StartActivity(i);
+
             String extras = bundle.GetString(JPushInterface.ExtraExtra);
             //String myValue = "";
             try
@@ -261,10 +267,7 @@
                 System.Console.WriteLine(TAG, "Unexpected: extras is not a valid json", e);
                 return;
             }
-            Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 璧峰缁勪欢瀵硅薄 , 鐩爣 Service.class);
-            i.PutExtras(bundle);
-            i.SetFlags(ActivityFlags.NewTask);
-            context.StartActivity(i);
+         
             //if (TYPE_THIS.equals(myValue))
             //{
             //Intent mIntent = new Intent(context, ThisActivity.class);
@@ -282,42 +285,15 @@
         }
 
 
-        /// <summary>
-        /// android閫氱煡鏍忕偣鍑绘墦寮�鍙瀵硅鐨勬柟娉�
-        /// </summary>
-        /// <param name="hiddenJson">浜戠鎺ㄨ繃鏉ョ殑鏁版嵁</param>
-        private void VideoMethod(string hiddenJson)
-        {
 
-            var json = Newtonsoft.Json.Linq.JObject.Parse(hiddenJson);
-            if (json == null)
-            {
-                return;
-            }
-            Shared.Phone.VideoPhone.ESVideoInfo eSVideoInfo = new Shared.Phone.VideoPhone.ESVideoInfo();
-            if (json["uuid"].ToString().Contains(","))
-            {
-                var uuid = json["uuid"].ToString().Split(',');
-                eSVideoInfo.ESVideoUUID = uuid[0];
-            }
-            else
-            {
-                eSVideoInfo.ESVideoUUID = json["uuid"].ToString();
-            }
 
-            eSVideoInfo.DeviceName = Language.StringByID(Shared.R.MyInternationalizationString.theOutdoorUnit);
-            eSVideoInfo.ESRoomID = int.Parse(json["roomno"].ToString());
-            if (!string.IsNullOrEmpty(json["unitno"].ToString()))
-            {
-                string str = json["unitno"].ToString();
-                string str1 = str.Substring(0, 2).TrimStart('0');
-                string str2 = str.Substring(2, 2).TrimStart('0');
-                eSVideoInfo.RoomName = str1 + Language.StringByID(Shared.R.MyInternationalizationString.dong) + str2 + Language.StringByID(Shared.R.MyInternationalizationString.unit);
-            }
-            Shared.Phone.VideoPhone.ESVideo.ShowESvideoVideoIntercom(eSVideoInfo);
 
-            //var url = "https://global.hdlcontrol.com/HangZhouHdlCloudApi/VideoIntercom/Answer";
-            //var dd=await Shared.Phone.Device.Logic.Send.HttpWebRequest(url, json.ToString(), "POST", 3, true);
+
+
+
+
+        /// <summary>
        /// android閫氱煡鏍忕偣鍑绘墦寮�鍙瀵硅鐨勬柟娉�
        /// </summary>
        /// <param name="hiddenJson">浜戠鎺ㄨ繃鏉ョ殑鏁版嵁</param>
        private void VideoMethod(string hiddenJson)
        {
            
            var hiddanJson = Newtonsoft.Json.Linq.JObject.Parse(hiddenJson);
            if (hiddanJson == null)
            {
                return;
            }
            var json = Newtonsoft.Json.Linq.JObject.Parse(hiddanJson["HiddanJson"].ToString());
            if (json == null)
            {
                return;
            }
            Shared.Phone.VideoPhone.ESVideoInfo eSVideoInfo = new Shared.Phone.VideoPhone.ESVideoInfo();
            if (json["uuid"].ToString().Contains(","))
            {
                var uuid = json["uuid"].ToString().Split(',');
                eSVideoInfo.ESVideoUUID = uuid[0];

            }
            else
            {
                eSVideoInfo.ESVideoUUID = json["uuid"].ToString();
            }

            eSVideoInfo.DeviceName = Language.StringByID(Shared.R.MyInternationalizationString.theOutdoorUnit);
            eSVideoInfo.ESRoomID = int.Parse(json["roomno"].ToString());
            if (!string.IsNullOrEmpty(json["unitno"].ToString()))
            {
                string str = json["unitno"].ToString();
                string str1 = str.Substring(0, 2).TrimStart('0');
                string str2 = str.Substring(2, 2).TrimStart('0');
                eSVideoInfo.RoomName = str1 + Language.StringByID(Shared.R.MyInternationalizationString.dong) + str2 + Language.StringByID(Shared.R.MyInternationalizationString.unit);
            }
            Shared.Phone.VideoPhone.ESVideo.ShowESvideoVideoIntercom(eSVideoInfo);
+
         }
     }
 }

--
Gitblit v1.8.0