Package-level declarations

Types

Link copied to clipboard

Pure Kotlin Base64 utility — no expect/actual needed.

Link copied to clipboard
class BinaryLogFile(context: Context, name: String) : FileOutputStream

A specialized FileOutputStream that writes data to a file in the application's external files directory. Primarily used for low-level protocol debugging and packet logging.

Link copied to clipboard
actual object BuildUtils

Utility for checking build properties, such as emulator detection.

expect object BuildUtils

Utility for checking build properties, such as emulator detection.

actual object BuildUtils

Utility for checking build properties, such as emulator detection.

Link copied to clipboard
actual typealias CommonIgnoredOnParcel = IgnoredOnParcel
typealias CommonIgnoredOnParcel = IgnoredOnParcel

Platform-agnostic IgnoredOnParcel annotation.

@Target(allowedTargets = [AnnotationTarget.PROPERTY])
expect annotation class CommonIgnoredOnParcel

Platform-agnostic IgnoredOnParcel annotation.

@Target(allowedTargets = [AnnotationTarget.PROPERTY])
actual annotation class CommonIgnoredOnParcel

Platform-agnostic IgnoredOnParcel annotation.

Link copied to clipboard
actual typealias CommonParcel = Parcel
typealias CommonParcel = Parcel

Platform-agnostic Parcel representation for manual parceling (e.g. AIDL support).

expect class CommonParcel

Platform-agnostic Parcel representation for manual parceling (e.g. AIDL support).

actual class CommonParcel

Platform-agnostic Parcel representation for manual parceling (e.g. AIDL support).

Link copied to clipboard
actual typealias CommonParcelable = Parcelable

Platform-agnostic Parcelable interface.

expect interface CommonParcelable

Platform-agnostic Parcelable interface.

actual interface CommonParcelable

Platform-agnostic Parcelable interface.

Link copied to clipboard
actual typealias CommonParceler<T> = Parceler<T>
typealias CommonParceler<T> = Parceler<T>

Platform-agnostic Parceler interface.

expect interface CommonParceler<T>

Platform-agnostic Parceler interface.

actual interface CommonParceler<T>

Platform-agnostic Parceler interface.

Link copied to clipboard
actual typealias CommonParcelize = Parcelize
typealias CommonParcelize = Parcelize

Platform-agnostic Parcelize annotation.

@Target(allowedTargets = [AnnotationTarget.CLASS])
expect annotation class CommonParcelize

Platform-agnostic Parcelize annotation.

@Target(allowedTargets = [AnnotationTarget.CLASS])
actual annotation class CommonParcelize

Platform-agnostic Parcelize annotation.

Link copied to clipboard
actual typealias CommonTypeParceler<T, P> = TypeParceler<T, P>
typealias CommonTypeParceler<T, P> = TypeParceler<T, P>

Platform-agnostic TypeParceler annotation.

expect annotation class CommonTypeParceler<T, P : CommonParceler<in T>>

Platform-agnostic TypeParceler annotation.

actual annotation class CommonTypeParceler<T, P : CommonParceler<in T>>

Platform-agnostic TypeParceler annotation.

Link copied to clipboard
typealias CommonUri = Uri

Platform-agnostic URI representation backed by uri-kmp.

Link copied to clipboard
actual object DateFormatter

Platform-agnostic Date formatter utility.

expect object DateFormatter

Platform-agnostic Date formatter utility.

actual object DateFormatter

Platform-agnostic Date formatter utility.

Link copied to clipboard

Sometimes when starting services we face situations where messages come in that require computation but we can't do that computation yet because we are still waiting for some long running init to complete.

Link copied to clipboard
object Exceptions
Link copied to clipboard
object GPSFormat
Link copied to clipboard

This util class allows you to optimize the binary size of the transmitted text message strings. It replaces certain characters from national alphabets with the characters from the latin alphabet that have an identical appearance (homoglyphs), for example: cyrillic "А", "С", "у" -> latin "A", "C", "y", etc. According to statistics, such letters can make up about 20-25% of the total number of letters in the average text. Replacing them with Latin characters reduces the binary size of the transmitted message. The average transmitted message volume can then fit around ~140-145 characters instead of ~115-120

Link copied to clipboard

Represents the system's preferred measurement system.

Link copied to clipboard

Centralized metric formatting for display strings. Eliminates duplicated formatString patterns across Node, NodeItem, and metric screens.

Link copied to clipboard

Pure Kotlin number formatting utility — no expect/actual needed.

Link copied to clipboard

A helper class that manages a single Job. When a new job is launched, any previous job is cancelled. This is useful for ensuring that only the latest operation of a certain type is running at a time (e.g. for search or settings updates).

Link copied to clipboard
object UrlUtils

Pure Kotlin URL encoding utility — no expect/actual needed.

Link copied to clipboard

An InputFilter that constrains text length based on UTF-8 byte count instead of character count. This is particularly useful for fields that must be stored in byte-limited buffers, such as hardware configuration fields.

Properties

Link copied to clipboard
expect val ioDispatcher: CoroutineDispatcher

Access to the IO dispatcher in a multiplatform-safe way.

actual val ioDispatcher: CoroutineDispatcher

Access to the IO dispatcher in a multiplatform-safe way.

Link copied to clipboard

Accessor for the current time as a stable Instant.

Link copied to clipboard

Accessor for the current time in milliseconds.

Link copied to clipboard

Accessor for the current time in seconds.

Link copied to clipboard
val systemTimeZone: TimeZone

Accessor for the system default time zone.

Functions

Link copied to clipboard
fun bearing(lat1: Double, lon1: Double, lat2: Double, lon2: Double): Double

Computes the bearing in degrees between two points on Earth.

Link copied to clipboard
fun exceptionReporter(inner: () -> Unit)

Wraps and discards exceptions, but reports them to the crash reporter before logging. Use this for operations that should not crash the process but are still unexpected.

Link copied to clipboard

Extracts WIFI SSID and password from a QR code string. Expected format: WIFI:S:SSID;P:PASSWORD;;

Link copied to clipboard
fun formatString(pattern: String, vararg args: Any?): String

Pure-Kotlin multiplatform string formatting.

Link copied to clipboard

Retrieves PackageInfo for a given package name in a backward-compatible way.

Link copied to clipboard

Retrieves a Parcelable extra from an Intent in a backward-compatible way.

Link copied to clipboard

returns the system's preferred measurement system.

returns the system's preferred measurement system.

returns the system's preferred measurement system.

Link copied to clipboard
fun CoroutineScope.handledLaunch(context: CoroutineContext = EmptyCoroutineContext, start: CoroutineStart = CoroutineStart.DEFAULT, block: suspend CoroutineScope.() -> Unit): Job

Launches a new coroutine with a central CoroutineExceptionHandler that reports errors to Exceptions.

Link copied to clipboard
fun ignoreException(silent: Boolean = false, inner: () -> Unit)

Wraps and discards exceptions, optionally logging them.

Link copied to clipboard
suspend fun ignoreExceptionSuspend(silent: Boolean = false, inner: suspend () -> Unit)

Suspend-compatible variant of ignoreException. Re-throws CancellationException.

Link copied to clipboard

Validates if the given string is a valid network address (IP or domain).

Validates if the given string is a valid network address (IP or domain).

Validates if the given string is a valid network address (IP or domain).

Link copied to clipboard
fun latLongToMeter(latitudeA: Double, longitudeA: Double, latitudeB: Double, longitudeB: Double): Double
Link copied to clipboard

Normalizes a BLE/device address to a canonical uppercase form with colons removed. Returns "DEFAULT" for null, blank, or sentinel values ("N", "NULL").

Link copied to clipboard

Reads a Parcelable from a Parcel in a backward-compatible way.

Link copied to clipboard
fun Context.registerReceiverCompat(receiver: BroadcastReceiver, filter: IntentFilter, flag: Int = ContextCompat.RECEIVER_EXPORTED)

Registers a BroadcastReceiver using ContextCompat to ensure consistent behavior across Android versions.

Link copied to clipboard
inline fun <T> safeCatching(block: () -> T): Result<T>

Like kotlin.runCatching, but re-throws CancellationException to preserve structured concurrency. Use this instead of runCatching in coroutine contexts.

Link copied to clipboard
inline fun <T, R> T.safeCatching(block: T.() -> R): Result<R>

Like kotlin.runCatching receiver variant, but re-throws CancellationException.

Link copied to clipboard
inline fun <T> safeCatchingAll(block: () -> T): Result<T>

Like safeCatching but also catches JVM Errors (e.g. ExceptionInInitializerError raised by compose-resources' lazy skiko initialization on the desktop JVM test classpath). Still re-throws CancellationException so structured concurrency is preserved. Use when the block invokes code whose failure modes include static-initializer errors and the caller only needs a best-effort fallback.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for Instant.toDate(): Date

Converts this Instant to a legacy Date.

Link copied to clipboard

Converts these milliseconds to an Instant.

Link copied to clipboard
fun <T> toRemoteExceptions(inner: () -> T): T

Wraps an operation and converts any thrown exceptions into RemoteException for safe return through an AIDL interface.