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