修改优先级
This commit is contained in:
parent
1489be0c64
commit
37cbac1a2e
|
|
@ -82,7 +82,7 @@ object NotificationTriggerController {
|
|||
|
||||
// 常驻通知通道
|
||||
val residentChannel = NotificationChannel(
|
||||
CHANNEL_ID_RESIDENT, CHANNEL_NAME_RESIDENT, NotificationManager.IMPORTANCE_DEFAULT
|
||||
CHANNEL_ID_RESIDENT, CHANNEL_NAME_RESIDENT, NotificationManager.IMPORTANCE_HIGH
|
||||
).apply {
|
||||
description = "for resident notification"
|
||||
setShowBadge(false)
|
||||
|
|
@ -344,6 +344,7 @@ object NotificationTriggerController {
|
|||
.setSmallIcon(R.drawable.ic_noti_icon)
|
||||
.setContentTitle(model.contentTitle)
|
||||
.setContentText(model.contentContent)
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||
.setGroup(CHANNEL_ID_RESIDENT + model.notificationId)
|
||||
.setContentIntent(model.contentIntent).setCustomContentView(model.contentView)
|
||||
.setCustomBigContentView(model.contentView).setOngoing(true).setSilent(true).build()
|
||||
|
|
|
|||
|
|
@ -390,6 +390,8 @@ class NotificationUtil private constructor() {
|
|||
}
|
||||
|
||||
notificationManager.createNotificationChannel(channel)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue