我试图在创建通知渠道后更新它。具体来说,我想正确设置通知声音,但是在创建之后。我无法找到正确的方法来做到这一点。
我尝试的方法是删除该渠道并重新创建它,但似乎不起作用...
我尝试的方法是删除该渠道并重新创建它,但似乎不起作用...
if (notificationManager != null) {
notificationManager.deleteNotificationChannel(NOTIFICATION_CHANNEL_ID);
notificationManager.createNotificationChannel(channel);
System.out.println("Created notification channel" + channel.getSound() + " " + channel.getImportance());
}