Package-level declarations

Types

Link copied to clipboard
data class ActiveRadioSession(val generation: Long, val address: String)

Immutable per-session identity. generation is bumped for every app session, one per SDK session of the selected radio, so consumers can discard state retained from a previous session even when the selected address is unchanged.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class AndroidMeshLocationManager(context: Application, locationRepository: LocationRepository, radioConfigRepository: RadioConfigRepository) : MeshLocationManager
Link copied to clipboard
Link copied to clipboard

The platform geocoder in US English whatever the device's locale, since root topic segments use English place names. Devices without a geocoder backend (no Play services on the F-Droid flavor) get null and the topic finder falls back to the region and what it hears.

Link copied to clipboard
Link copied to clipboard

This receiver starts the MeshService on boot if a device was previously connected.

Link copied to clipboard

What a boot / package-replaced broadcast should do about the previously selected device.

Link copied to clipboard

Runs a conversation notification's reply, mark-as-read and thumbs-up actions, which open no UI.

Link copied to clipboard
class ConversationShortcutPublisher(context: Context, nodeRepository: NodeRepository, packetRepository: PacketRepository, radioConfigRepository: RadioConfigRepository, dispatchers: CoroutineDispatchers)

Single owner of the dynamic conversation shortcuts that link Meshtastic conversations to their notifications.

Link copied to clipboard
class DefaultLastBleNodeRecorder(serviceRepository: ServiceRepository, nodeRepository: NodeRepository, nodeManager: NodeManager, firmwareRecoveryDataSource: FirmwareRecoveryDataSource) : LastBleNodeRecorder

Every BLE node is recorded, ESP32 included: only an nRF52 bootloader advertises the legacy DFU service the scan looks for, so other architectures never match.

Link copied to clipboard

Platform work to run after RadioControllerImpl commits a new device address.

Link copied to clipboard

The MeshNotificationManager for platforms that show plain notifications through a NotificationManager (desktop and web): turns each mesh event into a Notification record in the slot and with the click destination Android uses for the same event, and leaves the gating on preferences and permission to the NotificationManager.

Link copied to clipboard

Decides whether starting MeshService as a foreground service is legal, and which foreground service types it may claim.

Link copied to clipboard

MessageQueue and MeshWorkerManager for hosts without a background work scheduler (desktop and web): both hand the packet straight to radioController from this process.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun interface LastBleNodeRecorder

Keeps FirmwareRecoveryDataSource.lastBleNode pointing at the node of the last completed BLE handshake, so the Connections screen can offer to re-flash it if it later turns up stranded in its bootloader.

Link copied to clipboard
class LinkEnvironmentObserver(bluetoothRepository: BluetoothRepository, networkRepository: NetworkRepository, serialDevicePresence: SerialDevicePresence, radioOperationLock: RadioOperationLock, processLifecycle: Lifecycle)

Watches what ends a client's reconnect wait and what takes the port, and reports both to the link supervisor.

Link copied to clipboard
class LiveUpdateGuard(prefs: LiveUpdatePrefs, nodes: () -> Flow<Map<Int, Node>>, selectedAddress: Flow<String?>, radioOperationLock: RadioOperationLock)

Turns a Live Update off once what it shows is gone: the tracked node was deleted or ignored, or the user disconnected or switched radios. A dropped link changes neither, so the mode survives it and the notification shows the state.

Link copied to clipboard

The Stop action on a Live Update notification. Turning the mode off is all it takes: the service notification re-renders as the plain connection state, and the radio stays connected.

Link copied to clipboard
fun interface LocalNetworkAccess

Whether the platform currently permits opening a socket to a local-network address.

Link copied to clipboard

Encrypted per-device storage for lockdown passphrases, in openEncryptedPreferences. The key is not gated behind biometric authentication so that auto-unlock can run in the background without user interaction.

class LockdownPassphraseStoreImpl(dataDir: File = File(desktopDataDir())) : LockdownPassphraseStore

File-backed encrypted passphrase store for JVM/Desktop.

Link copied to clipboard
class MeshLogCleanup(meshLogRepository: MeshLogRepository, meshLogPrefs: MeshLogPrefs)

Prunes the mesh log to the persisted retention policy. Android runs runOnce from MeshLogCleanupWorker on WorkManager's hourly schedule; desktop has no WorkManager and runs runHourly for as long as the app is open.

Link copied to clipboard
class MeshNotificationManagerImpl(context: Context, packetRepository: Lazy<PacketRepository>, nodeRepository: Lazy<NodeRepository>, conversationShortcutPublisher: Lazy<ConversationShortcutPublisher>, radioConfigRepository: Lazy<RadioConfigRepository>, radioOperationLock: RadioOperationLock, firmwareUpdateStatusRepository: FirmwareUpdateStatusRepository, liveUpdatePrefs: LiveUpdatePrefs, meshPrefs: MeshPrefs, localeUnitsProvider: LocaleUnitsProvider, scope: ServiceScope) : MeshNotificationManager

Manages the creation and display of all app notifications.

Link copied to clipboard

Quick Settings tile for the radio link: shows the connection and connects or disconnects the selected radio. An active tile, so it listens only when QuickSettingsTileController asks the system to refresh it.

Link copied to clipboard

Android foreground service that hosts the Meshtastic mesh radio connection.

Link copied to clipboard
class MeshServiceOrchestrator(radioInterfaceService: RadioInterfaceService, serviceStateWriter: ServiceStateWriter, nodeManager: NodeManager, serviceNotifications: MeshNotificationManager, takServerIntegration: TakServerIntegration, takPrefs: TakPrefs, databaseManager: DatabaseManager, connectionManager: MeshConnectionManager, dispatchers: CoroutineDispatchers, localNetworkAccess: LocalNetworkAccess, lastBleNodeRecorder: LastBleNodeRecorder)

Platform-agnostic orchestrator for the mesh service lifecycle.

Link copied to clipboard

DeviceAddressChangeHook for hosts with no mesh service to start. Bind it per platform.

Link copied to clipboard

LocalNetworkAccess for hosts without the Android 17 gate: access is always granted. Bind it per platform.

Link copied to clipboard
Link copied to clipboard

What a tap on the Quick Settings tile does.

Link copied to clipboard
class QuickSettingsTileController(context: Context, radioController: RadioController, radioInterfaceService: RadioInterfaceService, radioPrefs: RadioPrefs, nodeRepository: NodeRepository, orchestrator: MeshServiceOrchestrator, appScope: ApplicationCoroutineScope)

Backs MeshQuickSettingsTileService: publishes the tile's state and performs its taps on the application scope, so a tap's work outlives the tile service, which the system unbinds as soon as the shade closes.

Link copied to clipboard
data class QuickSettingsTileState(val state: Int, val subtitle: QuickSettingsTileSubtitle, val action: QuickSettingsTileAction)

Everything the tile renders, with state one of Tile.STATE_ACTIVE or Tile.STATE_INACTIVE.

Link copied to clipboard
sealed interface QuickSettingsTileSubtitle

The tile's secondary line.

Link copied to clipboard
class RadioControllerImpl(serviceRepository: ServiceRepository, nodeRepository: NodeRepository, packetHandler: PacketHandler, tracerouteHandler: TracerouteHandler, neighborInfoHandler: NeighborInfoHandler, nodeManager: NodeManager, radioInterfaceService: RadioInterfaceService, sessionAdmin: SessionAdmin, locationManager: MeshLocationManager, packetRepository: Lazy<PacketRepository>, dataHandler: Lazy<MeshDataHandler>, analytics: PlatformAnalytics, meshPrefs: MeshPrefs, uiPrefs: UiPrefs, databaseManager: DatabaseManager, serviceNotifications: MeshNotificationManager, radioOperationLock: RadioOperationLock, radioConfigRepository: RadioConfigRepository, scope: ServiceScope, deviceAddressChangeHook: DeviceAddressChangeHook) : RadioController, AdminController, MessagingController, NodeController, QueryController

Platform-agnostic RadioController composition root for any target where the service runs in-process (Desktop, iOS, or Android in single-process mode).

Link copied to clipboard

Encrypted per-node storage for security key backups, in openEncryptedPreferences like LockdownPassphraseStoreImpl. Keyed by node number, matching iOS's per-node Keychain entries.

class SecurityKeyBackupStoreImpl(dataDir: File = File(desktopDataDir())) : SecurityKeyBackupStore

File-backed encrypted key-backup store for JVM/Desktop, mirroring LockdownPassphraseStoreImpl. Each node's key backup is an AES-256-GCM .enc file under $MESHTASTIC_DATA_DIR/security_keys/; see DesktopKeystoreCipher for the key handling.

Link copied to clipboard

Platform-agnostic implementation of ServiceRepository.

Link copied to clipboard

Why MeshService is being asked to start.

Link copied to clipboard

What the mesh service should do once the selected-device address has settled.

Link copied to clipboard

Runs admin commands on the local node through the active radio session's SDK admin API.

Link copied to clipboard
class SharedRadioInterfaceService(dispatchers: CoroutineDispatchers, environment: LinkEnvironmentObserver, processLifecycle: Lifecycle, radioPrefs: RadioPrefs, links: RadioLinks, analytics: PlatformAnalytics, radioOperationLock: RadioOperationLock, serviceStateWriter: ServiceStateWriter) : RadioInterfaceService

The selected radio's SDK client and the app sessions it carries.

Link copied to clipboard

Starts MeshService for a newly selected device, since the foreground service owns the connection on Android.

Link copied to clipboard

Encrypted per-install storage for the local TAK server's TLS material, in openEncryptedPreferences. Blobs are Base64-encoded because EncryptedSharedPreferences only stores strings.

class TakCertificateStoreImpl(dataDir: File = File(desktopDataDir())) : TakCertificateStore

File-backed encrypted store for the local TAK server's TLS material on JVM/Desktop.

Link copied to clipboard
class UnreadBadgeSync(packetRepository: PacketRepository, badge: AppIconBadge)

Keeps badge on the unread message count the navigation bar shows, for as long as run is collecting.

Link copied to clipboard

Android MessageQueue that hands each persisted message to MeshWorkerManager for background transmission.

Functions

Link copied to clipboard
fun bootReconnectDecision(address: String?, hasBluetoothPermission: Boolean): BootReconnectDecision

Decides what an unattended reconnect should do, given the persisted device and the current permission.

Link copied to clipboard
fun quickSettingsTileState(connectionState: ConnectionState, hasSelectedDevice: Boolean, serviceRunning: Boolean, ourShortName: String?): QuickSettingsTileState

Maps the radio link onto the tile.

Link copied to clipboard
fun serviceStayAliveDecision(address: String?, hasActiveRadioOperation: Boolean, canConnect: (String) -> Boolean): ServiceStayAliveDecision

Decides whether the mesh service keeps running once the address flow has settled.

Link copied to clipboard

Starts MeshService as a foreground service so the radio link stays alive for the duration of the connection.