From 5bd6f3b8f9e529051c605bc40e04acdd362cf7bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E7=9B=9B?= Date: Fri, 22 Jan 2021 19:11:09 +0800 Subject: [PATCH] Add Notification - Android property "display_foreground" --- Jiguang.JPush/Model/Notification.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Jiguang.JPush/Model/Notification.cs b/Jiguang.JPush/Model/Notification.cs index 1be94d0..6073567 100644 --- a/Jiguang.JPush/Model/Notification.cs +++ b/Jiguang.JPush/Model/Notification.cs @@ -82,6 +82,25 @@ public class Android /// [JsonProperty("uri_action", NullValueHandling = NullValueHandling.Ignore)] public string URIAction { get; set; } + + /// + /// 使用DisplayForeground进行设置。 + /// + [JsonProperty("display_foreground", NullValueHandling = NullValueHandling.Ignore)] + internal string Display_Foreground + { + get + { + return DisplayForeground == null ? null : (DisplayForeground.Value ? "1" : "0"); + } + } + + /// + /// APP在前台,通知是否展示。默认情况下 APP 在前台会弹出通知栏消息。 + /// + /// JPush Android SDK v3.5.8 版本开始支持。 + [JsonIgnore] + public bool? DisplayForeground { get; set; } } public class IOS