我试图实现的是类似#2 的通知(“已连接USB调试”):
在单独的行上显示标题和说明。
但是,当我使用
创建通知频道时
NotificationChannel(channelId,channelName,Notificationmanager.IMPORTANCE_MIN)
将会显示为通知#3 -折叠标题时位于同一行-不管通知本身的优先级如何(priority = NotificationCompat.PRIORITY_MIN
或priority = NotificationCompat.PRIORITY_HIGH
)
如果渠道重要性提高到LOW
NotificationChannel(channelId,Notificationmanager.IMPORTANCE_LOW)
或上方的通知显示为普通通知#1 (“正在运行同步”)
如何显示展开的静默通知?
我还尝试设置其他选项,例如setsound(null,null)
等,但是它们也不起作用。