Skip to content

Commit ee95d3c

Browse files
committed
Fix pre-O devices
1 parent 6098416 commit ee95d3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ protected static NotificationChannelWrapper getNotificationChannel(Context conte
229229
}
230230

231231
@TargetApi(Build.VERSION_CODES.O)
232-
protected static NotificationChannelWrapper notificationChannelToWrapper(NotificationChannel channel) {
232+
protected static NotificationChannelWrapper notificationChannelToWrapper(Object chan) {
233+
// Possibly unavailable classes cannot be in API, breaks reflection code looping over when searching for method
234+
NotificationChannel channel = (NotificationChannel)chan;
233235
NotificationChannelWrapper wrapper = new NotificationChannelWrapper();
234236

235237
wrapper.id = channel.getId();

0 commit comments

Comments
 (0)