MeshNotificationManagerImpl

class MeshNotificationManagerImpl(context: Context, packetRepository: Lazy<PacketRepository>, nodeRepository: Lazy<NodeRepository>, conversationShortcutPublisher: Lazy<ConversationShortcutPublisher>, radioConfigRepository: Lazy<RadioConfigRepository>, scope: ServiceScope) : MeshNotificationManager(source)

Manages the creation and display of all app notifications.

This class centralizes notification logic, including channel creation, builder configuration, and displaying notifications for various events like new messages, alerts, and service status changes.

Constructors

Link copied to clipboard
constructor(context: Context, packetRepository: Lazy<PacketRepository>, nodeRepository: Lazy<NodeRepository>, conversationShortcutPublisher: Lazy<ConversationShortcutPublisher>, radioConfigRepository: Lazy<RadioConfigRepository>, scope: ServiceScope)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun cancelLowBatteryNotification(node: Node)
Link copied to clipboard
open suspend override fun cancelMessageNotification(contactKey: String)
Link copied to clipboard
open override fun clearClientNotification(notification: ClientNotification)
Link copied to clipboard
open override fun clearNotifications()
Link copied to clipboard

Returns the last-built service state notification, or an immediately available application-label fallback. This method is used by MeshService for android.app.Service.startForeground, so it must not wait for Compose Multiplatform resource loading.

Link copied to clipboard
open override fun initChannels()

Creates all necessary notification channels on devices running Android O or newer. This should be called once when the service is created.

Link copied to clipboard
open suspend override fun refreshConversationAfterReply(contactKey: String)

Re-posts the conversation silently after an inline reply, so the notification updates in place with the sent reply appended (the read context becomes historic, the reply is the visible latest message) instead of disappearing. Re-posting under the same (tag, id) is also what resolves the RemoteInput spinner.

Link copied to clipboard
open override fun showAlertNotification(contactKey: String, name: String, alert: String)
Link copied to clipboard
open override fun showClientNotification(clientNotification: ClientNotification)
Link copied to clipboard
open override fun showNewNodeSeenNotification(node: Node)
Link copied to clipboard
open override fun showOrUpdateLowBatteryNotification(node: Node, isRemote: Boolean)
Link copied to clipboard
open suspend override fun updateMessageNotification(contactKey: String, name: String, message: String, isBroadcast: Boolean, channelName: String?, isSilent: Boolean)
Link copied to clipboard
open suspend override fun updateReactionNotification(contactKey: String, name: String, emoji: String, isBroadcast: Boolean, channelName: String?, isSilent: Boolean)
Link copied to clipboard
open override fun updateServiceStateNotification(state: ConnectionState, telemetry: Telemetry?)
Link copied to clipboard
open suspend override fun updateWaypointNotification(contactKey: String, name: String, message: String, waypointId: Int, isSilent: Boolean)