Package-level declarations

Types

Link copied to clipboard
open class AlertManager

A global manager for displaying alerts across the application. This allows ViewModels to trigger alerts without direct dependencies on UI components.

Link copied to clipboard
interface BarcodeScanner
Link copied to clipboard
data class ChannelAddPreview(val settings: List<ChannelSettings>, val selections: List<Boolean>)

Filtered ADD-mode preview: the visible channel list paired with its default selections (always size-matched).

Link copied to clipboard
fun interface ComposableContent
Link copied to clipboard
data class DiscoveryMapNode(val latitude: Double, val longitude: Double, val shortName: String?, val longName: String?, val neighborType: DiscoveryNeighborType, val snr: Float = 0.0f, val rssi: Int = 0, val messageCount: Int = 0, val sensorPacketCount: Int = 0)

Platform-neutral representation of a discovered node for map rendering. Contains only the data needed to place and style a marker — no Room entities or platform types leak into the map provider API.

Link copied to clipboard

Neighbor type classification for discovery map markers.

Link copied to clipboard
interface MapViewProvider

Interface for providing a flavored MapView. This allows the map feature to be decoupled from specific map implementations (Google Maps vs OSMDroid). Platform implementations create their own ViewModel via Koin.

Link copied to clipboard

The UX-relevant state of a runtime permission, as recommended by the Android permissions guidance (https://developer.android.com/training/permissions/requesting). Declared in lifecycle order.

Link copied to clipboard
class PermissionUiState(val status: PermissionStatus, val request: () -> Unit, val openAppSettings: () -> Unit)

A reactive snapshot of a runtime permission plus the actions a caller can take. Produced by the rememberXxxPermissionState() composables and recomputed on ON_RESUME so it stays fresh when the user returns from a permission dialog or the system settings screen.

Link copied to clipboard
open class SnackbarManager

A global manager for displaying snackbars across the application. This allows ViewModels to trigger transient feedback messages without direct dependencies on UI components or SnackbarHostState.

Link copied to clipboard
data class TracerouteMapOverlayInsets(val overlayAlignment: Alignment = Alignment.BottomCenter, val overlayPadding: PaddingValues = PaddingValues(bottom = 16.dp), val contentHorizontalAlignment: Alignment.Horizontal = Alignment.CenterHorizontally)

Properties

Link copied to clipboard
val ChannelOption.labelRes: StringResource
Link copied to clipboard
val LocalDiscoveryMapProvider: ProvidableCompositionLocal<@Composable (userLatitude: Double, userLongitude: Double, nodes: List<DiscoveryMapNode>, modifier: Modifier) -> Unit>

Provides an embeddable discovery map composable that renders discovered node markers and topology polylines for a Local Mesh Discovery scan session. Unlike LocalMapViewProvider, this does not include node clustering, waypoints, location tracking, or any main-map features — it is designed to be embedded inside the discovery summary scaffold.

Link copied to clipboard

Provides the active EventFirmwareEdition (if any) to the composition tree. When a connected device reports an event firmware edition, this local is populated at the app root so that MainAppBar can display event branding automatically — no per-screen wiring needed.

Link copied to clipboard
val LocalMapMainScreenProvider: ProvidableCompositionLocal<@Composable (onClickNodeChip: (Int) -> Unit, navigateToNodeDetails: (Int) -> Unit, waypointId: Int?) -> Unit>

Provides the platform-specific Map Main Screen. On Desktop or JVM targets where native maps aren't available yet, it falls back to a PlaceholderScreen.

Link copied to clipboard

The connected device's mesh Send/Receive activity stream, provided once at the app root (see MeshtasticAppShell).

Link copied to clipboard
val LocalModemPreset: ProvidableCompositionLocal<Config.LoRaConfig.ModemPreset?>

The connected device's active LoRa modem preset, provided once at the app root (see MeshtasticAppShell) so signal quality can be rated relative to the preset's demodulation floor without threading it through every node/message composable. Null — the default before a device connects, and in previews/tests — falls back to the LongFast limit in ModemPreset?.snrLimit.

Link copied to clipboard
val LocalNfcScannerProvider: ProvidableCompositionLocal<@Composable (onResult: (String?) -> Unit, onNfcDisabled: () -> Unit) -> Unit>
Link copied to clipboard
val LocalNfcWriterProvider: ProvidableCompositionLocal<@Composable (url: String, onResult: (Boolean) -> Unit, onNfcDisabled: () -> Unit) -> Unit>
Link copied to clipboard

Provides the platform-specific Map Screen for a Node (e.g. Google Maps or OSMDroid on Android). On Desktop or JVM targets where native maps aren't available yet, it falls back to a PlaceholderScreen.

Link copied to clipboard
val LocalNodeTrackMapProvider: ProvidableCompositionLocal<@Composable (destNum: Int, positions: List<Position>, modifier: Modifier, selectedPositionTime: Int?, onPositionSelected: (Int) -> Unit?) -> Unit>

Provides an embeddable position-track map composable that renders a polyline with markers for the given positions. Unlike LocalNodeMapScreenProvider, this does not include a Scaffold or AppBar — it is designed to be embedded inside another screen layout (e.g. the position-log adaptive layout).

Link copied to clipboard

Whether the Site Planner coverage-estimate flow is available (Google flavor only, backed by the official hosted planner). Gates the "Estimate coverage" action on the node detail screen; the map's own control is gated equivalently in the Google MapView. Defaults to false so F-Droid/release never surface a dead action.

Link copied to clipboard
val LocalTracerouteMapProvider: ProvidableCompositionLocal<@Composable (tracerouteOverlay: TracerouteOverlay?, tracerouteNodePositions: Map<Int, Position>, onMappableCountChanged: (Int, Int) -> Unit, modifier: Modifier) -> Unit>

Provides an embeddable traceroute map composable that renders node markers and forward/return offset polylines for a traceroute result. Unlike LocalMapViewProvider, this does not include a Scaffold, AppBar, waypoints, location tracking, custom tiles, or any main-map features — it is designed to be embedded inside TracerouteMapScreen's scaffold.

Link copied to clipboard
val LocalTracerouteMapScreenProvider: ProvidableCompositionLocal<@Composable (destNum: Int, requestId: Int, logUuid: String?, onNavigateUp: () -> Unit) -> Unit>

Provides the platform-specific Traceroute Map Screen. On Desktop or JVM targets where native maps aren't available yet, it falls back to a PlaceholderScreen.

Functions

Link copied to clipboard

Parses the edition's #RRGGBB EventFirmwareEdition.accentColor into a Color, or null if absent/malformed.

Link copied to clipboard

A helper component that renders an AlertManager.AlertData using the same logic as MainScreen.

Link copied to clipboard

Parses HTML into an AnnotatedString with platform-appropriate rendering.

expect fun annotatedStringFromHtml(html: String, linkStyles: TextLinkStyles? = null): AnnotatedString

Parses HTML into an AnnotatedString with platform-appropriate rendering.

JVM stub — returns the raw HTML as plain text (no HTML rendering on Desktop).

Link copied to clipboard
fun annotateNeighborInfo(inString: String?, statusGreen: Color, statusYellow: Color, statusOrange: Color): AnnotatedString

Converts a raw neighbor info string into an AnnotatedString with SNR values highlighted according to their quality.

Link copied to clipboard
fun annotateTraceroute(inString: String?, statusGreen: Color, statusYellow: Color, statusOrange: Color): AnnotatedString

Converts a raw traceroute string into an AnnotatedString with SNR values highlighted according to their quality.

suspend fun applyImportedLoraConfigAfterChannelReplacement(importedLoraConfig: Config.LoRaConfig?, currentLoraConfig: Config.LoRaConfig?, radioController: RadioController, settleDelay: Duration = LORA_CONFIG_SETTLE_DELAY, delayFn: suspend (Duration) -> Unit = { delay(it) })

Applies an imported LoRa config after channel replacement writes have had time to settle.

Link copied to clipboard
suspend fun applyReplacementChannelSet(channelSet: ChannelSet, radioController: RadioController, radioConfigRepository: RadioConfigRepository, writeDelay: Duration = CHANNEL_REPLACEMENT_WRITE_DELAY, delayFn: suspend (Duration) -> Unit = { delay(it) }): Config.LoRaConfig?

Applies an imported ChannelSet as an authoritative replacement to the radio and local cache.

Link copied to clipboard
fun computePermissionStatus(granted: Boolean, hasRequested: Boolean, shouldShowRationale: Boolean): PermissionStatus

Pure classifier for a runtime permission's UX state. Kept platform-agnostic and side-effect-free so it can be unit-tested in commonTest without an Android Activity.

Link copied to clipboard
actual fun createClipEntry(text: String, label: String): ClipEntry

Creates a platform-appropriate ClipEntry for the given text.

expect fun createClipEntry(text: String, label: String = ""): ClipEntry

Creates a platform-appropriate ClipEntry for the given text.

actual fun createClipEntry(text: String, label: String): ClipEntry

Creates a platform-appropriate ClipEntry for the given text.

Link copied to clipboard
fun eventIconFor(editionName: String): DrawableResource?

Bundled branding drawable for an edition, or null. The metadata's iconUrl is null until icons are hosted, so the one drawable we ship stays code-mapped here; remove this once icons are loaded from EventFirmwareEdition.iconUrl.

Link copied to clipboard
fun formatAgo(lastSeenUnixSeconds: Int): String

Composable convenience overload that resolves string resources automatically.

fun formatAgo(lastSeenUnixSeconds: Int, unknownText: String, nowText: String): String

Formats a given Unix timestamp (in seconds) into a relative "time ago" string.

Link copied to clipboard
Link copied to clipboard
fun getChannelList(new: List<ChannelSettings>, old: List<ChannelSettings>): List<Channel>

Builds a Channel list from the difference between two ChannelSettings lists. Only changes are included in the resulting list.

Link copied to clipboard
fun getChannelPreviewForAdd(existing: List<ChannelSettings>, incoming: List<ChannelSettings>, loraConfig: Config.LoRaConfig, maxChannels: Int): ChannelAddPreview

Builds the filtered ADD-mode preview for QR import: existing channels followed by only the unique incoming channels.

Link copied to clipboard
fun getChannelReplacementList(new: List<ChannelSettings>, currentSettings: List<ChannelSettings>, minimumSlotCount: Int = 0, maximumSlotCount: Int = Int.MAX_VALUE): List<Channel>

Builds an authoritative Channel list for a full REPLACE import. Every position in new is emitted (PRIMARY at index 0, SECONDARY for 1..new.lastIndex) and any trailing positions beyond new's range are emitted as DISABLED so the radio stops using them.

Link copied to clipboard

A constant PermissionUiState for platforms / API levels where a permission is not gated at runtime.

Link copied to clipboard

Returns whether Bluetooth is currently turned off at the system level (the adapter exists but is disabled). Always false on devices without Bluetooth and on platforms where the concept doesn't apply.

Returns whether Bluetooth is currently turned off at the system level (the adapter exists but is disabled). Always false on devices without Bluetooth and on platforms where the concept doesn't apply.

JVM — Bluetooth adapter state is not surfaced on Desktop.

Link copied to clipboard

Returns whether GPS/location services are currently disabled at the system level. Always false on platforms where this concept doesn't apply.

Returns whether GPS/location services are currently disabled at the system level. Always false on platforms where this concept doesn't apply.

JVM — GPS is never disabled on Desktop (concept doesn't apply).

Link copied to clipboard
fun isPermissionGroupGranted(results: List<Boolean>, requireAll: Boolean): Boolean

Reduces the per-permission grant results of a permission group to a single granted flag.

Link copied to clipboard

Returns whether the device currently lacks any transport that can back the network-scan discovery (no active Wi-Fi, Ethernet, or VPN). Cellular alone is not sufficient — a carrier uplink does not place the device on the same segment as a Meshtastic node — so a cellular-only state surfaces the "connect to Wi-Fi" hint. The function name is historical: the original implementation checked Wi-Fi alone, later widened to Ethernet, and now also recognizes VPN (ZeroTier/Tailscale) as a valid reachability path for a TCP node. The name is retained to avoid churning the expect/actual contract and every consumer. Always false where the concept doesn't apply.

Returns whether the device currently lacks any transport that can back the network-scan discovery (no active Wi-Fi, Ethernet, or VPN). Cellular alone is not sufficient — a carrier uplink does not place the device on the same segment as a Meshtastic node — so a cellular-only state surfaces the "connect to Wi-Fi" hint. The function name is historical: the original implementation checked Wi-Fi alone, later widened to Ethernet, and now also recognizes VPN (ZeroTier/Tailscale) as a valid reachability path for a TCP node. The name is retained to avoid churning the expect/actual contract and every consumer. Always false where the concept doesn't apply.

JVM — local-network availability is not gated on Desktop.

Link copied to clipboard
actual fun KeepScreenOn(enabled: Boolean)

Keeps the screen awake while enabled is true. No-op on platforms that don't support it.

expect fun KeepScreenOn(enabled: Boolean)

Keeps the screen awake while enabled is true. No-op on platforms that don't support it.

actual fun KeepScreenOn(enabled: Boolean)

JVM no-op — Keep screen on is not applicable on Desktop.

Link copied to clipboard
fun normalizeReplacementSettings(settings: List<ChannelSettings>, loraConfig: Config.LoRaConfig?): List<ChannelSettings>

Normalizes an imported REPLACE-mode ChannelSettings list so firmware only materializes real, distinct channels.

Link copied to clipboard
Link copied to clipboard
fun parseDeepLinkOrInvalid(uriString: String, onHandleDeepLink: (CommonUri, onInvalid: () -> Unit) -> Unit, onInvalid: () -> Unit)
Link copied to clipboard
@Preview(showBackground = true, name = "Composable Content Alert")
fun PreviewComposableAlert()
Link copied to clipboard
@Preview(showBackground = true, name = "HTML Alert")
fun PreviewHtmlAlert()
Link copied to clipboard
@Preview(showBackground = true, name = "Icon and Text Alert")
fun PreviewIconAlert()
Link copied to clipboard
@Preview(showBackground = true, name = "Multiple Choice Alert")
fun PreviewMultipleChoiceAlert()
Link copied to clipboard
@Preview(showBackground = true, name = "Simple Text Alert")
fun PreviewTextAlert()
Link copied to clipboard

Returns the reactive PermissionUiState for the Bluetooth scan/connect permissions. On pre-Android-12 devices BLE scanning is gated by the location permission, so the returned state delegates to rememberLocationPermissionState.

Returns the reactive PermissionUiState for the Bluetooth scan/connect permissions. On pre-Android-12 devices BLE scanning is gated by the location permission, so the returned state delegates to rememberLocationPermissionState.

JVM — Desktop does not gate Bluetooth behind a runtime permission.

Link copied to clipboard

Returns the reactive PermissionUiState for the CAMERA permission. Always PermissionStatus.GRANTED on platforms that don't require a runtime camera permission.

Returns the reactive PermissionUiState for the CAMERA permission. Always PermissionStatus.GRANTED on platforms that don't require a runtime camera permission.

JVM — Desktop does not gate the camera behind a runtime permission.

Link copied to clipboard

Returns the reactive PermissionUiState for the ACCESS_LOCAL_NETWORK permission. Always PermissionStatus.GRANTED on API levels / platforms that don't gate local-network access behind a runtime permission.

Returns the reactive PermissionUiState for the ACCESS_LOCAL_NETWORK permission. Always PermissionStatus.GRANTED on API levels / platforms that don't gate local-network access behind a runtime permission.

JVM — Desktop does not gate local-network access behind a runtime permission.

Link copied to clipboard

Returns the reactive PermissionUiState for the location permissions, recomputed on ON_RESUME. On platforms without runtime permissions the status is always PermissionStatus.GRANTED.

Returns the reactive PermissionUiState for the location permissions, recomputed on ON_RESUME. On platforms without runtime permissions the status is always PermissionStatus.GRANTED.

JVM — Desktop does not gate location behind a runtime permission.

Link copied to clipboard

Returns the reactive PermissionUiState for the POST_NOTIFICATIONS permission. Always PermissionStatus.GRANTED on API levels / platforms that don't gate notifications behind a runtime permission.

Returns the reactive PermissionUiState for the POST_NOTIFICATIONS permission. Always PermissionStatus.GRANTED on API levels / platforms that don't gate notifications behind a runtime permission.

JVM — Desktop does not gate notifications behind a runtime permission.

Link copied to clipboard

Returns a function that opens this app's system settings page (where the user can change any permission).

Returns a function that opens this app's system settings page (where the user can change any permission).

JVM stub — app settings are not available on Desktop.

Link copied to clipboard

Returns a launcher to open the platform's Bluetooth settings.

Returns a launcher to open the platform's Bluetooth settings.

JVM stub — Bluetooth settings are not available on Desktop.

Link copied to clipboard
actual fun rememberOpenFileLauncher(onUriReceived: (CommonUri?) -> Unit): (mimeType: String) -> Unit

Returns a launcher function to prompt the user to open/pick a file. The callback receives the selected file URI.

expect fun rememberOpenFileLauncher(onUriReceived: (CommonUri?) -> Unit): (mimeType: String) -> Unit

Returns a launcher function to prompt the user to open/pick a file. The callback receives the selected file URI.

actual fun rememberOpenFileLauncher(onUriReceived: (CommonUri?) -> Unit): (mimeType: String) -> Unit

JVM — Opens a native file dialog to pick a file.

Link copied to clipboard

Returns a launcher to open the platform's location settings.

Returns a launcher to open the platform's location settings.

Returns a launcher to open the platform's location settings.

Link copied to clipboard
actual fun rememberOpenMap(): (latitude: Double, longitude: Double, label: String) -> Unit

Returns a function to open the platform's map application at the given coordinates.

expect fun rememberOpenMap(): (latitude: Double, longitude: Double, label: String) -> Unit

Returns a function to open the platform's map application at the given coordinates.

actual fun rememberOpenMap(): (latitude: Double, longitude: Double, label: String) -> Unit

JVM stub — map opening is not available on Desktop.

Link copied to clipboard

Returns a function to open the platform's NFC settings.

Returns a function to open the platform's NFC settings.

JVM stub — NFC settings are not available on Desktop.

Link copied to clipboard
actual fun rememberOpenUrl(): (url: String) -> Unit

Returns a function to open the platform's browser with the given URL.

expect fun rememberOpenUrl(): (url: String) -> Unit

Returns a function to open the platform's browser with the given URL.

actual fun rememberOpenUrl(): (url: String) -> Unit

JVM stub — URL opening via Desktop browse API.

Link copied to clipboard

Returns a launcher to open the platform's Wi-Fi settings.

Returns a launcher to open the platform's Wi-Fi settings.

JVM stub — Wi-Fi settings are not available on Desktop.

Link copied to clipboard

Generates a QR code painter directly using the Skia/Compose canvas API in pure Kotlin.

Link copied to clipboard
actual fun rememberReadTextFromUri(): suspend (CommonUri, maxChars: Int) -> String?

Returns a suspend function that reads up to maxChars characters of text from a CommonUri. Returns null if the file is empty or cannot be read.

expect fun rememberReadTextFromUri(): suspend (CommonUri, maxChars: Int) -> String?

Returns a suspend function that reads up to maxChars characters of text from a CommonUri. Returns null if the file is empty or cannot be read.

actual fun rememberReadTextFromUri(): suspend (CommonUri, maxChars: Int) -> String?

JVM — Reads text from a file URI.

Link copied to clipboard
actual fun rememberSaveFileLauncher(onUriReceived: (CommonUri) -> Unit): (defaultFilename: String, mimeType: String) -> Unit

Returns a launcher function to prompt the user to save a file. The callback receives the saved file URI.

expect fun rememberSaveFileLauncher(onUriReceived: (CommonUri) -> Unit): (defaultFilename: String, mimeType: String) -> Unit

Returns a launcher function to prompt the user to save a file. The callback receives the saved file URI.

actual fun rememberSaveFileLauncher(onUriReceived: (CommonUri) -> Unit): (defaultFilename: String, mimeType: String) -> Unit

JVM — Opens a native file dialog to save a file.

Link copied to clipboard
actual fun rememberShowToast(): suspend (String) -> Unit

Returns a function to show a toast message.

expect fun rememberShowToast(): suspend (String) -> Unit

Returns a function to show a toast message.

actual fun rememberShowToast(): suspend (String) -> Unit

JVM stub — toast messages are logged instead.

Link copied to clipboard
actual fun rememberShowToastResource(): suspend (StringResource) -> Unit

Returns a function to show a toast message from a string resource.

expect fun rememberShowToastResource(): suspend (StringResource) -> Unit

Returns a function to show a toast message from a string resource.

actual fun rememberShowToastResource(): suspend (StringResource) -> Unit

JVM stub — toast messages are logged instead.

Link copied to clipboard
actual fun SetScreenBrightness(brightness: Float)

A Composable that sets the screen brightness while it is in the composition.

expect fun SetScreenBrightness(brightness: Float)

A Composable that sets the screen brightness while it is in the composition.

actual fun SetScreenBrightness(brightness: Float)

JVM no-op — screen brightness control is not available on Desktop.

Link copied to clipboard
fun shouldShowWifiUnavailableBanner(isNetworkScanning: Boolean, localNetworkPermissionGranted: Boolean, wifiUnavailable: Boolean, discoveredTcpDevicesEmpty: Boolean): Boolean

Returns true when the "Wi-Fi unavailable" recovery banner should render in ConnectionsScreen.

Link copied to clipboard
suspend fun Context.showToast(text: String)
suspend fun Context.showToast(stringResource: StringResource, vararg formatArgs: Any)
Link copied to clipboard
inline fun Modifier.thenIf(precondition: Boolean, action: Modifier.() -> Modifier): Modifier

Conditionally applies the action to the receiver Modifier if precondition is true. Otherwise, returns the receiver unchanged.

Link copied to clipboard
Link copied to clipboard
fun MeshPacket.toPosition(): Position?