Notification

data class Notification(val title: String, val message: String, val type: Notification.Type = Type.Info, val category: Notification.Category = Category.Message, val isSilent: Boolean = false, val id: Int? = null, val deepLink: String? = null, val onlyAlertOnce: Boolean = false)(source)

A notification as the dispatch primitive (NotificationManager) sees it.

Constructors

Link copied to clipboard
constructor(title: String, message: String, type: Notification.Type = Type.Info, category: Notification.Category = Category.Message, isSilent: Boolean = false, id: Int? = null, deepLink: String? = null, onlyAlertOnce: Boolean = false)

Types

Link copied to clipboard
Link copied to clipboard
object Companion
Link copied to clipboard
enum class Type : Enum<Notification.Type>

Properties

Link copied to clipboard
Link copied to clipboard

the path under DEEP_LINK_BASE_URI that a click opens, from NotificationDeepLinks; null opens the app where it was.

Link copied to clipboard
val id: Int?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

replacing a showing notification of the same tag updates it without alerting again.

Link copied to clipboard
val tag: String?

One slot per category and id, the way Android keys each notification by a tag and id: a newer notification replaces the one in its slot, and a new-node notice never replaces a low-battery one for the same node.

Link copied to clipboard
Link copied to clipboard