File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
OneSignalSDK/onesignal/src/main/java/com/onesignal Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,17 @@ else if ("null".equals(sound) || "nil".equals(sound))
174
174
channel .setShowBadge (payload .optInt ("bdg" , 1 ) == 1 );
175
175
channel .setBypassDnd (payload .optInt ("bdnd" , 0 ) == 1 );
176
176
177
- notificationManager .createNotificationChannel (channel );
177
+ OneSignal .onesignalLog (OneSignal .LOG_LEVEL .VERBOSE , "Creating notification channel with channel:\n " + channel .toString ());
178
+ try {
179
+ notificationManager .createNotificationChannel (channel );
180
+ } catch (IllegalArgumentException e ) {
181
+ // TODO: Remove this try-catch once it is figured out which argument is causing Issue #895
182
+ // try-catch added to prevent crashing from the illegal argument
183
+ // Added logging above this try-catch so we can evaluate the payload of the next victim
184
+ // to report a stacktrace
185
+ // https://github.com/OneSignal/OneSignal-Android-SDK/issues/895
186
+ e .printStackTrace ();
187
+ }
178
188
return channel_id ;
179
189
}
180
190
You can’t perform that action at this time.
0 commit comments