MeshServiceNotificationsImpl

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>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun cancelLowBatteryNotification(node: Node)
Link copied to clipboard
open 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 builds a default one if none exists. This is used by MeshService for android.app.Service.startForeground.

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 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)