NotificationEvent

data class NotificationEvent(val key: String, val packageName: String, val title: String?, val text: String?, val bigText: String?, val subText: String?, val tickerText: String?, val category: String?, val channelId: String?, val groupKey: String?, val isOngoing: Boolean, val isClearable: Boolean, val legacyPriority: Int, val channelImportance: Int, val postedAt: Long, val when: Long, val hasReplyAction: Boolean, val actionLabels: List<String>)

Push-side projection of a posted notification. Emitted on NotificationListenerBus when McpNotificationListenerServiceBase receives onNotificationPosted. Pure-data — no Notification reference, no PendingIntents, no large image extras leak across the bus.

priority is intentionally split so the user-channel signal stays distinguishable from the app's self-reported urgency.

Constructors

Link copied to clipboard
constructor(key: String, packageName: String, title: String?, text: String?, bigText: String?, subText: String?, tickerText: String?, category: String?, channelId: String?, groupKey: String?, isOngoing: Boolean, isClearable: Boolean, legacyPriority: Int, channelImportance: Int, postedAt: Long, when: Long, hasReplyAction: Boolean, actionLabels: List<String>)

Properties

Link copied to clipboard

Action button labels in order — labels only, no PendingIntents.

Link copied to clipboard

EXTRA_BIG_TEXT — messaging apps put the full message body here.

Link copied to clipboard

Notification.category — primary filter signal. Values like Notification.CATEGORY_MESSAGE, CATEGORY_CALL, CATEGORY_EMAIL, CATEGORY_PROMO, etc. Null when the source app didn't set one.

Link copied to clipboard

Disambiguates "messages" vs "calls" within one app.

Link copied to clipboard

Effective importance (NotificationManager.IMPORTANCE_*) from the listener's Ranking.importance — on O+ this is the posting channel's user-settable "how much do I care" signal. -1 when no ranking is available for the notification.

Link copied to clipboard

Conversation-bundle key. Same value across grouped notifications.

Link copied to clipboard

True if any action carries a RemoteInput with allowFreeFormInput.

Link copied to clipboard
Link copied to clipboard

True for foreground-service / always-running notifications.

Link copied to clipboard
val key: String

Unique per-active notification id from the framework.

Link copied to clipboard

Notification.priority — only meaningful pre-O; usually 0 post-O.

Link copied to clipboard
Link copied to clipboard

When the system received and posted this notification.

Link copied to clipboard

EXTRA_SUB_TEXT — usually conversation name on messaging apps.

Link copied to clipboard
val text: String?
Link copied to clipboard

Marquee / one-shot text.

Link copied to clipboard
Link copied to clipboard
val when: Long

notification.when — app-set timestamp, often the message send time.