Models

object Models(source)

Download, check and remove each feature's models (ModelPack).

Properties

Link copied to clipboard
val progress: StateFlow<DownloadState>

The running download, if any.

Functions

Link copied to clipboard
fun cancel(context: Context, feature: ModelPack, wifiOnly: Boolean = true)
Link copied to clipboard
fun download(context: Context, feature: ModelPack, wifiOnly: Boolean = true)

Downloads feature's models in the background, with a progress notification, and indexes the library with it afterwards. Several requests queue up.

Link copied to clipboard
fun remove(context: Context, feature: ModelPack, wifiOnly: Boolean = true)

Deletes feature's models and what it found (removing Faces deletes people and their names).

Link copied to clipboard
fun size(context: Context, feature: ModelPack): Long

Bytes to download for feature (all of it; less if part of it is already there).

Link copied to clipboard
fun status(context: Context, feature: ModelPack): FeatureStatus