NotificationConfig
data class NotificationConfig(val id: Int, val channelId: String, val title: String, val body: String, val smallIcon: Int, val priority: Int = NotificationCompat.PRIORITY_DEFAULT, val autoCancel: Boolean = true, val contentIntent: PendingIntent? = null, val ongoing: Boolean = false)(source)
Describes a local notification to be posted to the system tray.
Provides semantic presets that align with standard UI states:
NotificationConfig.info -> Neutral information
NotificationConfig.success -> Operation successful
NotificationConfig.warning -> High priority warning
NotificationConfig.error -> Error or failure notification
Example usage:
val config = NotificationConfig(
id = 101,
channelId = "updates",
title = "Update available",
body = "A new version of Kindling is ready to install.",
smallIcon = R.drawable.ic_notification,
autoCancel = true
)
notificationHelper.post(config)Content copied to clipboard