I need to use two different notification with different notification channel importance - one with NotificationManager.IMPORTANCE_LOW and one with NotificationManager.IMPORTANCE_MIN. I can not use two different notification channels because both of then need to have same channel name and if that, notification settings will be duplicated. I tried to use
notificationManager
.getNotificationChannel(NotificationUtils.NOTIFICATION_CHANNEL_ID)
.setImportance(NotificationManager.IMPORTANCE_LOW);
but it didn't change notification channel importance. Then I tried to delete notification channel from NotificationManager and create new one, just before building notification:
notificationManager.deleteNotificationChannel(NotificationUtils.NOTIFICATION_CHANNEL_ID);
notificationManager.createNotificationChannel(new NotificationChannel(
NotificationUtils.NOTIFICATION_CHANNEL_ID,
context.getString(R.string.app_name),
NotificationManager.IMPORTANCE_LOW));
but it also do not change importance.