美文网首页
Android8.0关闭通知栏声音

Android8.0关闭通知栏声音

作者: 奥巴荣 | 来源:发表于2019-08-29 08:38 被阅读0次

方法一:降低重要度(修改后需要重装APP或清数据)

NotificationChannel channel = new NotificationChannel(channelID, channelName, NotificationManager.IMPORTANCE_LOW); 

方法二:设置只响一次(重启APP后第一次会响)

builder.setOnlyAlertOnce(true);

方法三:到手机应用通知管理设置铃声为“无”

参考

通知概览 | Android Developers
https://developer.android.google.cn/guide/topics/ui/notifiers/notifications.html

解决android8.0在通知中更新进度条导致连续响铃振动的bug - 掘金
https://juejin.im/post/5a6fe06251882573402685ad

Android 8 通知渠道(Notification Channels) - 掘金
https://juejin.im/post/5b3c376df265da0f6436a1fc

相关文章

网友评论

      本文标题:Android8.0关闭通知栏声音

      本文链接:https://www.haomeiwen.com/subject/pdjbectx.html