From 4796f4a91d85dedb5a30d2f5d3844c5720f5919a Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期五, 13 五月 2022 17:36:46 +0800
Subject: [PATCH] 2022年05月13日17:36:43

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

diff --git a/HDL-ON_Android/Other/JPush/JPushReceiver.cs b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
index a7fba9f..4566b62 100644
--- a/HDL-ON_Android/Other/JPush/JPushReceiver.cs
+++ b/HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -37,6 +37,9 @@
             //2020-12-23 瑙e喅鐐瑰嚮閫氱煡鏍忔墦寮�涓嶄簡APP闂
             //base.OnNotifyMessageOpened(context, notificationMessage);
 
+            //NotificationManager NotifyManager = (NotificationManager)GetSystemService(Context.NotificationService);
+            //NotificationManager notificationManager = NotifyManager;
+
             OpenNotification(context, notificationMessage);
         }
 
@@ -83,7 +86,11 @@
             {
                 HDLCommon.Current.AdjustPushMessage(pushMes);
             });
-
+            if (!MainPage.IsEnterBackground)
+            {
+                NotificationManager nMgr = (NotificationManager)Shared.Application.Activity.GetSystemService(Context.NotificationService);
+                nMgr.CancelAll();
+            }
         }
 
         /// <summary>

--
Gitblit v1.8.0