修改通知名称
This commit is contained in:
parent
37cbac1a2e
commit
191d19a908
|
|
@ -39,7 +39,7 @@ class NotificationUtil private constructor() {
|
|||
fun createNotificationChannel(channelId: String, channelName: String, importance: Int) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
val channel = NotificationChannel(channelId, channelName, importance).apply {
|
||||
description = "Channel description"
|
||||
description = channelName
|
||||
enableLights(true)
|
||||
lightColor = Color.RED
|
||||
enableVibration(true)
|
||||
|
|
@ -362,7 +362,7 @@ class NotificationUtil private constructor() {
|
|||
}
|
||||
|
||||
// 6. 发送通知
|
||||
showNotification(notificationId, builder.build(), "xxxname")
|
||||
showNotification(notificationId, builder.build(), channelName)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue