Package-level declarations

Types

Link copied to clipboard
object ByteStringParceler : <ERROR CLASS> ERROR CLASS: Symbol not found for CommonParceler<ERROR CLASS: Symbol not found for ByteString?>

Parceler for Okio ByteString for Android Parcelable support

Link copied to clipboard
object ByteStringSerializer : <ERROR CLASS> ERROR CLASS: Symbol not found for KSerializer<ERROR CLASS: Symbol not found for ByteString>

Serializer for Okio ByteString using kotlinx.serialization

Link copied to clipboard
Link copied to clipboard

Exception thrown when a Meshtastic URL cannot be parsed.

Link copied to clipboard
class MeshDataMapper(nodeIdLookup: NodeIdLookup)

Utility class to map MeshPacket protobufs to DataPacket domain models.

Link copied to clipboard
interface NodeIdLookup

Interface for looking up Node IDs from Node Numbers.

Link copied to clipboard
expect object SfppHasher

Computes SFPP (Store-Forward-Plus-Plus) message hashes for deduplication.

actual object SfppHasher
Link copied to clipboard

Common time-related constants.

Link copied to clipboard

Properties

Link copied to clipboard

When printing strings to logs sometimes we want to print useful debugging information about users or positions. But we don't want to leak things like usernames or locations. So this function if given a string, will return a string which is a maximum of three characters long, taken from the tail of the string. Which should effectively hide real usernames and locations, but still let us see if values were zero, empty or different.

Link copied to clipboard

Path segment for Channel Set URIs.

Link copied to clipboard

Full prefix for Channel Set URIs: https://meshtastic.org/e/

Link copied to clipboard

Path segment for Shared Contact URIs.

Link copied to clipboard

Full prefix for Shared Contact URIs: https://meshtastic.org/v/#

Link copied to clipboard
const val isDebug: Boolean = false

Whether the app is running in debug mode.

Link copied to clipboard

The base domain for all Meshtastic URIs.

Link copied to clipboard
val ERROR CLASS: Symbol not found for ChannelSet.primaryChannel: Channel?

Return the primary channel info

Link copied to clipboard
val ERROR CLASS: Symbol not found for ChannelSet.subscribeList: List<String>

Functions

Link copied to clipboard
fun Any?.anonymize(maxLen: Int = 3): String

A version of anonymize that allows passing in a custom minimum length

Link copied to clipboard
fun String.base64ToByteString(): ERROR CLASS: Symbol not found for ByteString

Decodes a Base64 string into a ByteString.

Link copied to clipboard
fun byteArrayOfInts(vararg ints: Int): ByteArray

Utility function to make it easy to declare byte arrays

Link copied to clipboard
fun compareUsers(oldUser: ERROR CLASS: Symbol not found for User, newUser: ERROR CLASS: Symbol not found for User): String

Compares two User objects and returns a string detailing the differences.

Link copied to clipboard
fun <T : ERROR CLASS: Symbol not found for Message<T, *>> ERROR CLASS: Symbol not found for ProtoAdapter<T>.decodeOrNull(bytes: ERROR CLASS: Symbol not found for ByteString??, logger: ERROR CLASS: Symbol not found for Logger?? = null): T?

fun <T : ERROR CLASS: Symbol not found for Message<T, *>> ERROR CLASS: Symbol not found for ProtoAdapter<T>.decodeOrNull(bytes: ByteArray?, logger: ERROR CLASS: Symbol not found for Logger?? = null): T?

Safely decode a proto message from ByteArray, returning null on error.

Link copied to clipboard
fun Uri.dispatchMeshtasticUri(onChannel: (ChannelSet) -> Unit, onContact: (SharedContact) -> Unit, onInvalid: () -> Unit)

Bridge extension for Android clients.

fun ERROR CLASS: Symbol not found for CommonUri.dispatchMeshtasticUri(onChannel: (ERROR CLASS: Symbol not found for ChannelSet) -> Unit, onContact: (ERROR CLASS: Symbol not found for SharedContact) -> Unit, onInvalid: () -> Unit)

Tries to parse a Meshtastic URI as a Channel Set or Shared Contact, including fallback logic.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for ByteString.encodeToString(): String
Link copied to clipboard
fun formatMuteRemainingTime(remainingMillis: Long): Pair<Int, Double>

Calculates the remaining mute time in days and hours.

Link copied to clipboard
fun formatUptime(seconds: Int): String

Formats a duration in seconds as a human-readable uptime string (e.g., "1d 2h 3m 4s").

Link copied to clipboard
fun ERROR CLASS: Symbol not found for ChannelSet.getChannel(index: Int): Channel?
Link copied to clipboard
fun ERROR CLASS: Symbol not found for ChannelSet.getChannelUrl(upperCasePrefix: Boolean = false, shouldAdd: Boolean = false): ERROR CLASS: Symbol not found for CommonUri

Return a URL that represents the ChannelSet

Link copied to clipboard
fun getInitials(fullName: String): String

Given a human name, strip out the first letter of the first three words and return that as the initials for that user, ignoring emojis. If the original name is only one word, strip vowels from the original name and if the result is 3 or more characters, use the first three characters. If not, just take the first 3 characters of the original name.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for SharedContact.getSharedContactUrl(): ERROR CLASS: Symbol not found for CommonUri

Converts a SharedContact to its corresponding URI representation.

Link copied to clipboard
fun getShortDate(time: Long): String?

Returns a short string representing the time if it's within the last 24 hours, otherwise returns a short string representing the date.

Link copied to clipboard
expect fun getShortDateTime(time: Long): String

Returns a short string representing the time if it's within the last 24 hours, otherwise returns a combined short date/time string.

actual fun getShortDateTime(time: Long): String

Returns a short string representing the time if it's within the last 24 hours, otherwise returns a combined short date/time string.

Link copied to clipboard
fun handleMeshtasticUri(uri: ERROR CLASS: Symbol not found for CommonUri, onChannel: (ERROR CLASS: Symbol not found for CommonUri) -> Unit = {}, onContact: (ERROR CLASS: Symbol not found for CommonUri) -> Unit = {}): Boolean

Dispatches an incoming Meshtastic URI to the appropriate handler based on its path.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for ChannelSet.hasLoraConfig(): Boolean
Link copied to clipboard
fun ERROR CLASS: Symbol not found for Telemetry.hasValidEnvironmentMetrics(): Boolean

Returns true if this telemetry packet contains valid, plot-able environment metrics.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for MeshPacket.isDirectSignal(): Boolean

Returns true if this packet is a direct LoRa signal (not MQTT, and hop count matches).

Link copied to clipboard
fun ERROR CLASS: Symbol not found for MeshPacket.isLora(): Boolean

Returns true if this packet arrived via a LoRa transport mechanism.

Link copied to clipboard
fun <T : ERROR CLASS: Symbol not found for Message<T, *>> ERROR CLASS: Symbol not found for ProtoAdapter<T>.isWithinSizeLimit(message: T, maxBytes: Int): Boolean

Check if an encoded message would fit within a size limit.

Link copied to clipboard
fun <T : ERROR CLASS: Symbol not found for Message<T, *>> ERROR CLASS: Symbol not found for ProtoAdapter<T>.logMessage(message: T, logger: ERROR CLASS: Symbol not found for Logger, prefix: String = "")

Log a proto message with readable formatting.

Link copied to clipboard
fun Int.metersIn(system: ERROR CLASS: Symbol not found for DisplayUnits): Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
expect fun platformRandomBytes(size: Int): ByteArray
actual fun platformRandomBytes(size: Int): ByteArray
Link copied to clipboard
Link copied to clipboard
fun ChannelSet.qrCode(shouldAdd: Boolean): Bitmap?
Link copied to clipboard
fun <T : ERROR CLASS: Symbol not found for Message<T, *>> ERROR CLASS: Symbol not found for ProtoAdapter<T>.sizeInBytes(message: T): Int

Get the estimated encoded size of a message in bytes.

Link copied to clipboard
fun Uri.toChannelSet(): ChannelSet

Bridge extension for Android clients.

fun ERROR CLASS: Symbol not found for CommonUri.toChannelSet(): ERROR CLASS: Symbol not found for ChannelSet

Return a ChannelSet that represents the ChannelSet encoded by the URL.

Link copied to clipboard

Extension to bridge android.net.Uri to CommonUri for shared dispatch logic.

Link copied to clipboard
fun Int.toDistanceString(system: ERROR CLASS: Symbol not found for DisplayUnits): String
Link copied to clipboard
fun ByteArray.toHexString(): ERROR CLASS: Unresolved name: joinToString
Link copied to clipboard
fun <T : ERROR CLASS: Symbol not found for Message<T, *>> ERROR CLASS: Symbol not found for ProtoAdapter<T>.toOneLiner(message: T): String

Get a compact single-line string representation for JSON/API serialization.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for Config.toOneLineString(): String
fun ERROR CLASS: Symbol not found for MeshPacket.toOneLineString(): String
fun Any.toOneLineString(): ERROR CLASS: Unresolved name: replace
Link copied to clipboard
Link copied to clipboard

Generates a POSIX time zone string from a ZoneId. Uses the specification found here.

@RequiresApi(value = 26)
fun TimeZone.toPosixString(): String

Generates a POSIX time zone string from a TimeZone.

Link copied to clipboard
fun <T : ERROR CLASS: Symbol not found for Message<T, *>> ERROR CLASS: Symbol not found for ProtoAdapter<T>.toReadableString(message: T): String

Convert a proto message to a pretty-printed string representation.

Link copied to clipboard
fun Uri.toSharedContact(): SharedContact

Bridge extension for Android clients.

fun ERROR CLASS: Symbol not found for CommonUri.toSharedContact(): ERROR CLASS: Symbol not found for SharedContact

Return a SharedContact that represents the contact encoded by the URL.

Link copied to clipboard
fun Float.toSmallDistanceString(system: ERROR CLASS: Symbol not found for DisplayUnits): String
Link copied to clipboard
fun Float.toSpeedString(system: ERROR CLASS: Symbol not found for DisplayUnits): String
Link copied to clipboard
fun Float.toString(system: ERROR CLASS: Symbol not found for DisplayUnits): String
Link copied to clipboard
fun userFieldsToString(user: ERROR CLASS: Symbol not found for User): String

Converts a User object to a string representation of its fields and values.

Link copied to clipboard
Link copied to clipboard
fun xorHash(b: ByteArray): ERROR CLASS: Unresolved name: fold