MediaPipeModelManager
class MediaPipeModelManager(context: Context, spec: ModelManifestEntry = GEMMA_3_1B, downloader: ResumableModelDownloader = ResumableModelDownloader()) : ModelManager
Manages the on-demand MediaPipe Gemma model file in app-private storage. The model binary is NEVER committed to the repo — download is user-triggered (surfaced on the settings screen via ModelManager) and lands in filesDir/models/, resuming from a .tmp if a prior attempt was cut off.
The URL is manifest-derived (ModelManifestEntry, gallery A5) and the fetch is a real resumable transfer (ResumableModelDownloader, gallery A4). The CALLER is responsible for user consent (see ModelManifestEntry.requiresLicenseAck) and for running download inside a wifi-only WorkManager foreground job — this class owns file state + progress, not scheduling.
Constructors
Link copied to clipboard
constructor(context: Context, spec: ModelManifestEntry = GEMMA_3_1B, downloader: ResumableModelDownloader = ResumableModelDownloader())