修改通知名称

This commit is contained in:
renhaoting 2025-12-30 18:11:30 +08:00
parent 37cbac1a2e
commit 191d19a908
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}
/**