[MM-20640] Create notification channels only if supported (#3590)
* Create notification channels only if supported * Update comment
This commit is contained in:
parent
ec99b65f00
commit
f651da975f
1 changed files with 5 additions and 0 deletions
|
|
@ -530,6 +530,11 @@ public class CustomPushNotification extends PushNotification {
|
|||
}
|
||||
|
||||
private void createNotificationChannels() {
|
||||
// Notification channels are not supported in Android Nougat and below
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
return;
|
||||
}
|
||||
|
||||
final NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
mHighImportanceChannel = new NotificationChannel("channel_01", "High Importance", NotificationManager.IMPORTANCE_HIGH);
|
||||
|
|
|
|||
Loading…
Reference in a new issue