BundledAssetPacks

Packs shipped inside the APK as plain assets (assets/<packId>/...), for debug builds: an APK installed with installDebug has no asset packs. Add the pack's folder to the debug source set's assets; release builds use PlayAssetPacks.

Constructors

Link copied to clipboard
constructor(context: ERROR CLASS: Symbol not found for Context)

Functions

Link copied to clipboard
open suspend override fun fetch(packId: String): PackState

Starts or resumes the download and suspends until the state isSettled. Cancelling cancels the download.

Link copied to clipboard
open suspend override fun readBytes(packId: String, path: String): ByteArray?

A file of a ready pack, or null when the pack is not ready or has no such file.

Link copied to clipboard
open suspend override fun remove(packId: String)

Bundled files cannot be removed; the pack stays Ready.

Link copied to clipboard
open override fun state(packId: String): Flow<PackState>

The pack's state; the first value is read from the store, never assumed.