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
Link copied to clipboard
class CallbackContinuation<in T>(cb: (ERROR CLASS: Symbol not found for Result<T>) -> Unit) : Continuation<T>

An async continuation that calls a callback when the result is available.

Link copied to clipboard
actual typealias CommonIgnoredOnParcel = IgnoredOnParcel
typealias CommonIgnoredOnParcel = IgnoredOnParcel
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
expect annotation class CommonIgnoredOnParcel

Platform-agnostic IgnoredOnParcel annotation.

@Target(allowedTargets = [AnnotationTarget.PROPERTY])
actual annotation class CommonIgnoredOnParcel
Link copied to clipboard
actual typealias CommonParcel = Parcel
typealias CommonParcel = Parcel
expect class CommonParcel

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

actual class CommonParcel
Link copied to clipboard
expect interface CommonParcelable

Platform-agnostic Parcelable interface.

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

Platform-agnostic Parceler interface.

actual interface CommonParceler<T>
Link copied to clipboard
actual typealias CommonParcelize = Parcelize
typealias CommonParcelize = Parcelize
@Target(allowedTargets = [AnnotationTarget.CLASS])
expect annotation class CommonParcelize

Platform-agnostic Parcelize annotation.

@Target(allowedTargets = [AnnotationTarget.CLASS])
actual annotation class CommonParcelize
Link copied to clipboard
actual typealias CommonTypeParceler<T, P> = TypeParceler<T, P>
typealias CommonTypeParceler<T, P> = TypeParceler<T, P>
expect annotation class CommonTypeParceler<T, P : CommonParceler<in T>>

Platform-agnostic TypeParceler annotation.

actual annotation class CommonTypeParceler<T, P : CommonParceler<in T>>
Link copied to clipboard
actual class CommonUri
expect class CommonUri

Platform-agnostic URI representation to decouple core logic from android.net.Uri.

actual class CommonUri
Link copied to clipboard
interface Continuation<in T>

A deferred execution object (with various possible implementations)

Link copied to clipboard
actual object DateFormatter
expect object DateFormatter

Platform-agnostic Date formatter utility.

actual object DateFormatter
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

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

A blocking version of coroutine Continuation using traditional threading primitives.

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
val nowInstant: ERROR CLASS: Symbol not found for Instant

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: ERROR CLASS: Symbol not found for TimeZone

Accessor for the system default time zone.

Functions

Link copied to clipboard

Awaits the latch for the given Duration.

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
fun extractWifiCredentials(qrCode: String): ERROR CLASS: Symbol not found for Pair<kotlin/String?, kotlin/String?>

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

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.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for CoroutineScope.handledLaunch(context: ERROR CLASS: Symbol not found for CoroutineContext = EmptyCoroutineContext, start: ERROR CLASS: Symbol not found for CoroutineStart = CoroutineStart.DEFAULT, block: suspend ERROR CLASS: Symbol not found for CoroutineScope.() -> Unit): ERROR CLASS: Symbol not found for 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

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

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
fun Int.secondsToInstant(): ERROR CLASS: Symbol not found for Instant

Converts these seconds to an Instant.

Link copied to clipboard
fun <T> suspend(timeoutMsecs: Long = -1, initfn: (SyncContinuation<T>) -> Unit): T

Calls an initfn that is responsible for starting an operation and saving the SyncContinuation. Then blocks the current thread until the operation completes or times out.

Link copied to clipboard

Converts this Instant to a legacy Date.

Converts this Instant to a legacy Date.

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

Converts these milliseconds to an Instant.

Link copied to clipboard

Extension to convert platform Uri to CommonUri in Android source sets.

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.