From eb5e32e1dd5a6d1d106d77cb41bfebcd80d83c89 Mon Sep 17 00:00:00 2001 From: YouR97 <952870061@qq.com> Date: Fri, 19 Jul 2024 14:23:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Forest/Assets/PhxhSDK | 2 +- .../Gameplay/Debug/SROptions.Notification.cs | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Forest/Assets/PhxhSDK b/Forest/Assets/PhxhSDK index 438cf86..95e7db9 160000 --- a/Forest/Assets/PhxhSDK +++ b/Forest/Assets/PhxhSDK @@ -1 +1 @@ -Subproject commit 438cf8673e7e3ea212683cb534ba8aae243479f8 +Subproject commit 95e7db99dcaf0f75185920f6cb15f42ee9a01c18 diff --git a/Forest/Assets/Scripts/Gameplay/Debug/SROptions.Notification.cs b/Forest/Assets/Scripts/Gameplay/Debug/SROptions.Notification.cs index c9d315e..31839aa 100644 --- a/Forest/Assets/Scripts/Gameplay/Debug/SROptions.Notification.cs +++ b/Forest/Assets/Scripts/Gameplay/Debug/SROptions.Notification.cs @@ -9,12 +9,21 @@ public partial class SROptions [Category("通知相关"), DisplayName("通知id")] public int NotificationID { get; set; } + /// + /// 初始化通知 + /// + public void InitNotification() + { + Notification.Init(); + } + [Category("通知相关"), DisplayName("发送通知")] public void SendNotification() { #if UNITY_ANDROID - int id = Notification.Android.SetNotification("通知", "测试通知", DateTime.UtcNow.AddSeconds(5f), "small", "large", "测试", true); - DebugUtil.Log($"发送安卓测试通知,通知id{id}"); + DateTime dateTime = DateTime.UtcNow.AddSeconds(10f); + NotificationID = Notification.Android.SetNotification("通知", "测试通知", DateTime.UtcNow.AddSeconds(5f), "small", "large", "测试", true); + DebugUtil.Log($"发送安卓测试通知,通知id:{NotificationID},时间:{dateTime}"); #endif }