Skip to content

Commit 889f86e

Browse files
committed
Merge branch 'master' into innogames-feature/ShowInForeground-feature-for-Android
2 parents 0903796 + 99cd1a5 commit 889f86e

File tree

4 files changed

+601
-130
lines changed

4 files changed

+601
-130
lines changed

com.unity.mobile.notifications/Runtime/Android/AndroidNotificationCallback.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using UnityEngine;
23

34
namespace Unity.Notifications.Android
@@ -8,6 +9,17 @@ public NotificationCallback() : base("com.unity.androidnotifications.Notificatio
89
{
910
}
1011

12+
public override AndroidJavaObject Invoke(string methodName, AndroidJavaObject[] args)
13+
{
14+
if (methodName.Equals("onSentNotification", StringComparison.InvariantCulture) && args != null && args.Length == 1)
15+
{
16+
onSentNotification(args[0]);
17+
return null;
18+
}
19+
20+
return base.Invoke(methodName, args);
21+
}
22+
1123
public void onSentNotification(AndroidJavaObject notification)
1224
{
1325
AndroidReceivedNotificationMainThreadDispatcher.GetInstance().EnqueueReceivedNotification(notification);

0 commit comments

Comments
 (0)