Skip to content

Commit 42faeab

Browse files
committed
Ensure initialized, CreateNotificationBuilder is public (the two others calling this one)
1 parent 5f3fdbe commit 42faeab

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,12 @@ public static AndroidJavaObject CreateNotificationBuilder(int id, AndroidNotific
885885

886886
static void CreateNotificationBuilder(AndroidNotification notification, string channelId, out AndroidJavaObject notificationBuilder, out AndroidJavaObject extras)
887887
{
888+
if (!Initialize())
889+
{
890+
notificationBuilder = extras = null;
891+
return;
892+
}
893+
888894
long fireTime = notification.FireTime.ToLong();
889895
if (fireTime < 0L)
890896
{

0 commit comments

Comments
 (0)