MeshNotificationManager

The one notification API for shared code: every notification the app posts or cancels goes through here, and each platform renders it with its own channels, styles and tap targets. NotificationManager is the desktop's dispatch primitive underneath its implementation, not a second way in.

Functions

Link copied to clipboard
Link copied to clipboard
abstract suspend fun cancelMessageNotification(contactKey: String)

Suspending because Android rebuilds the group summary here, and the summary's labels come from string resources — resolving them must not block the caller's thread (see org.meshtastic.core.resources.getStringSuspend).

Link copied to clipboard
abstract fun cancelNewNodeNotification(nodeNum: Int)
Link copied to clipboard
abstract fun clearClientNotification(clientNotification: ClientNotification)
Link copied to clipboard
abstract fun clearNotifications()
Link copied to clipboard
abstract fun initChannels()
Link copied to clipboard
open suspend fun refreshConversationAfterReply(contactKey: String)

Called after an inline notification reply has been sent and persisted. Platforms that can should re-post the conversation notification silently with the sent reply appended — the MessagingStyle confirmation flow — so the RemoteInput spinner resolves with visible feedback instead of the notification vanishing. The default falls back to dismissing the conversation, which also resolves the spinner.

Link copied to clipboard
abstract suspend fun showAlertNotification(contactKey: String, name: String, alert: String)
Link copied to clipboard
abstract suspend fun showClientNotification(clientNotification: ClientNotification, title: String, severity: Notification.Type)

title and severity come from the notification's kind, which shared code classifies once for every platform.

Link copied to clipboard

Returns true only when the platform accepted the notification, so the caller can record it as shown.

Link copied to clipboard
abstract suspend fun showLowBatteryNotification(node: Node, isRemote: Boolean)

Posts the low-battery warning for node, alerting once.

Link copied to clipboard
abstract suspend fun showMeshBeaconNotification(offer: MeshBeaconOffer)
Link copied to clipboard
abstract suspend fun showNewNodeSeenNotification(node: Node, title: String)

title arrives resolved: the caller revalidates node's identity right before posting, with no suspension.

Link copied to clipboard
abstract suspend fun showReconnectBlockedNotification(title: String, message: String): Boolean

Returns true only when the platform accepted the notification. title and message arrive resolved.

Link copied to clipboard
open fun suppressClientNotificationModal(clientNotification: ClientNotification): Boolean

True when the platform presents clientNotification natively, so the in-app modal must not show it too.

Link copied to clipboard
abstract suspend fun updateLowBatteryNotification(node: Node, isRemote: Boolean)

Refreshes a still-showing low-battery warning with node's current level; never re-posts a dismissed one.

Link copied to clipboard
abstract suspend fun updateMessageNotification(contactKey: String, name: String, message: String, isBroadcast: Boolean, channelName: String?, isSilent: Boolean = false)
Link copied to clipboard
abstract suspend fun updateReactionNotification(contactKey: String, name: String, emoji: String, isBroadcast: Boolean, channelName: String?, isSilent: Boolean = false)
Link copied to clipboard
abstract fun updateServiceStateNotification(state: ConnectionState, telemetry: Telemetry?)
Link copied to clipboard
abstract suspend fun updateWaypointNotification(contactKey: String, name: String, message: String, waypointId: Int, isSilent: Boolean = false)