Package-level declarations

Types

Link copied to clipboard

Defines the status of network (internet or mobile) connection

Properties

Link copied to clipboard

Single threaded executors are used so no internal concurrency is used unlike using a thread pool. There's a common executor for lightweight operations and a dedicated executor for image analysis, that's used in ImageAnalysis.setAnalyzer

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Given an Uri that should be a file, it is converted to a Base64 string or null on error. Note: this doesn't require permission android.permission.READ_EXTERNAL_STORAGE because the Uri has the format of content:// which came from the SAF, Storage Access Framework, contrary to getting the file through file:// protocol.

Link copied to clipboard
fun <T> List<T>.getOrRandom(index: Int): T
Link copied to clipboard
Link copied to clipboard
fun Float.round(decimals: Int): Float
Link copied to clipboard
Link copied to clipboard

Converts a float (expected to be in range 0.00, 1.0) to a representable percentage

Link copied to clipboard

Converts a float (expected to be in range 0.00, 1.0) to a representable percentage

Link copied to clipboard
fun Float.trimToDecimals(decimals: Int): Float