I'm trying to update a notification channel after I create it. Namely, I want to properly set the notification sound, but after I create it. I can't really figure out the proper way to do this.
What I tried was to delete the channel and re-create it but it doesn't seem to be working...
if (notificationManager != null) {
notificationManager.deleteNotificationChannel(NOTIFICATION_CHANNEL_ID);
notificationManager.createNotificationChannel(channel);
System.out.println("Created notification channel" + channel.getSound() + " " + channel.getImportance());
}
Once a notification channel is created, the user has ultimate control over its settings. As the developer, you can only change the channel's title and description. If you want to recreate the channel, you have to use a different id.
See: https://developer.android.com/training/notify-user/channels