You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: com.unity.mobile.notifications/Runtime/Android/Plugins/com/unity/androidnotifications/UnityNotificationManager.java
if (android.os.Build.MANUFACTURER.equals("samsung") && ids.size() >= (SAMSUNG_NOTIFICATION_LIMIT - 1)) {
362
-
// There seems to be a limit of 500 concurrently scheduled alarms on Samsung devices.
363
-
// Attempting to schedule more than that might cause the app to crash.
364
-
Log.w(TAG_UNITY, String.format("Attempting to schedule more than %1$d notifications. There is a limit of %1$d concurrently scheduled Alarms on Samsung devices" +
365
-
" either wait for the currently scheduled ones to be triggered or cancel them if you wish to schedule additional notifications.",
366
-
SAMSUNG_NOTIFICATION_LIMIT));
361
+
if (!canScheduleMoreAlarms(ids))
367
362
returnnull;
368
-
}
369
363
370
364
Intentintent = buildNotificationIntent(context);
371
365
ids = newHashSet<>(ids);
@@ -374,6 +368,21 @@ private static synchronized Intent buildNotificationIntentUpdateList(Context con
if (ids.size() < (SAMSUNG_NOTIFICATION_LIMIT - 1))
373
+
returntrue;
374
+
if ("samsung".equals(android.os.Build.MANUFACTURER)) {
375
+
// There seems to be a limit of 500 concurrently scheduled alarms on Samsung devices.
376
+
// Attempting to schedule more than that might cause the app to crash.
377
+
Log.w(TAG_UNITY, String.format("Attempting to schedule more than %1$d notifications. There is a limit of %1$d concurrently scheduled Alarms on Samsung devices" +
378
+
" either wait for the currently scheduled ones to be triggered or cancel them if you wish to schedule additional notifications.",
0 commit comments