From 0fc2962749e7e1f4078717a9914ac8175a2c4b26 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期四, 26 九月 2024 20:53:55 +0800
Subject: [PATCH] 可视对讲,注册

---
 HDL-ON_Android/Other/JPush/JPushReceiver.cs |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/HDL-ON_Android/Other/JPush/JPushReceiver.cs b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
index 3261a1a..745527d 100644
--- a/HDL-ON_Android/Other/JPush/JPushReceiver.cs
+++ b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -53,11 +53,8 @@
         /// <param name="notificationMessage"></param>
         public override void OnNotifyMessageOpened(Context context, NotificationMessage notificationMessage)
         {
-
-
-            //2020-12-23 瑙e喅鐐瑰嚮閫氱煡鏍忔墦寮�涓嶄簡APP闂
-            //base.OnNotifyMessageOpened(context, notificationMessage);
-            OpenNotification(context, notificationMessage);
+            MainPage.Log("鎺ユ敹鍒版帹閫�:鐐瑰嚮閫氱煡鍥炶皟");
+            OpenNotification(context, notificationMessage,true);
         }
 
         /// <summary>
@@ -137,15 +134,17 @@
         /// </summary>
         /// <param name="context"></param>
         /// <param name="notificationMessage"></param>
-        public static void OpenNotification(Context context, NotificationMessage notificationMessage)
+        public static void OpenNotification(Context context, NotificationMessage notificationMessage,bool isNotification = false)
         {
             try
             {
+                MainPage.Log("鎺ユ敹鍒版帹閫�:鎵撳紑娑堟伅鏄剧ず鐣岄潰");
                 var pushMes = new JPushMessageInfo()
                 {
                     Title = notificationMessage.NotificationTitle,
                     Content = notificationMessage.NotificationContent,
-                    Extras = notificationMessage.NotificationExtras
+                    Extras = notificationMessage.NotificationExtras,
+                    isNotificationGoing = isNotification
                 };
 
                 var jpushExpandData = GetJPushExpandData(pushMes);
@@ -171,11 +170,14 @@
                 else
                 {
                     Intent i = new Intent(context, typeof(BaseActivity));
+                    i.SetFlags(ActivityFlags.SingleTop);
+                    i.SetFlags(ActivityFlags.ClearTop);
                     i.SetFlags(ActivityFlags.NewTask);
                     context.StartActivity(i);
                 }
                 //瑙f瀽msg
                 AdjustPushMessage(pushMes);
+
             }
             catch
             {

--
Gitblit v1.8.0