1

我想为默认声音静音Android Oreo创建一个通知通道,我尝试不指定声音,并且在发送通知时它仍然会播放声音。有任何想法吗?

NotificationChannel chan2 = new NotificationChannel(SECONDARY_CHANNEL,
            getString(R.string.noti_channel_second), 
NotificationManager.IMPORTANCE_HIGH);
    chan2.setLightColor(Color.BLUE);
    chan2.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
    getManager().createNotificationChannel(chan2);
4

1 回答 1

1

chan2.setSound(null, null);创建频道时添加。

于 2017-09-27T13:32:45.027 回答