Files
BingoGrassland/Assets/MYp0ZVTT2QSDK/ThirdParty/com.unity.mobile.notifications@2.3.2/Runtime/Android/AndroidNotificationCallback.cs
T
changyunjiaandchangyunjia c28ea8ea4a 提交
2026-06-29 16:21:36 +08:00

29 lines
863 B
C#
Executable File

using System;
using UnityEngine;
namespace Unity.Notifications.Android
{
class NotificationCallback : AndroidJavaProxy
{
public NotificationCallback() : base("com.unity.androidnotifications.NotificationCallback")
{
}
public override AndroidJavaObject Invoke(string methodName, AndroidJavaObject[] args)
{
if (methodName.Equals("onSentNotification", StringComparison.InvariantCulture) && args != null && args.Length == 1)
{
onSentNotification(args[0]);
return null;
}
return base.Invoke(methodName, args);
}
public void onSentNotification(AndroidJavaObject notification)
{
AndroidReceivedNotificationMainThreadDispatcher.GetInstance().EnqueueReceivedNotification(notification);
}
}
}