Skip to content

Commit 01d8d27

Browse files
committed
Move NotificationChannelWrapper and NotificationCallback to UnityNotificationManager file
1 parent 74fdbc9 commit 01d8d27

File tree

5 files changed

+20
-88
lines changed

5 files changed

+20
-88
lines changed

com.unity.mobile.notifications/Runtime/Android/Plugins/com/unity/androidnotifications/NotificationCallback.java

Lines changed: 0 additions & 7 deletions
This file was deleted.

com.unity.mobile.notifications/Runtime/Android/Plugins/com/unity/androidnotifications/NotificationCallback.java.meta

Lines changed: 0 additions & 32 deletions
This file was deleted.

com.unity.mobile.notifications/Runtime/Android/Plugins/com/unity/androidnotifications/NotificationChannelWrapper.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

com.unity.mobile.notifications/Runtime/Android/Plugins/com/unity/androidnotifications/NotificationChannelWrapper.java.meta

Lines changed: 0 additions & 32 deletions
This file was deleted.

com.unity.mobile.notifications/Runtime/Android/Plugins/com/unity/androidnotifications/UnityNotificationManager.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,3 +969,23 @@ private static synchronized Notification removeScheduledNotification(Integer id)
969969
return mScheduledNotifications.remove(id);
970970
}
971971
}
972+
973+
// Provide a wrapper for NotificationChannel.
974+
// Create this wrapper for all Android versions as NotificationChannel is only available for Android O or above.
975+
class NotificationChannelWrapper {
976+
public String id;
977+
public String name;
978+
public int importance;
979+
public String description;
980+
public boolean enableLights;
981+
public boolean enableVibration;
982+
public boolean canBypassDnd;
983+
public boolean canShowBadge;
984+
public long[] vibrationPattern;
985+
public int lockscreenVisibility;
986+
}
987+
988+
// Implemented in C# to receive callback on notification show
989+
interface NotificationCallback {
990+
void onSentNotification(Notification notification);
991+
}

0 commit comments

Comments
 (0)