Asset Packs
The app's entry point: one shared fetch per pack, an integrity check against the pack's assetdropkit.json, and reads on dispatcher, never the caller's thread.
stallTimeoutMillis (0 = off) bounds a download whose state stops changing, as an offline download parked in Pending does: it is cancelled and the fetch returns Failed(NoNetwork).
Constructors
Functions
Downloads the pack if needed and verifies it. Suspends until Ready, Failed, WaitingForWifi or NeedsPlayConfirmation, and returns a state rather than throwing. Callers fetching the same pack at once share one store request; the download is cancelled when every caller has been cancelled.
Registers Play's dialogs; call from the activity's onCreate, before it starts.
The pack's state; the first value is read from the store, never assumed. A store's Ready becomes Ready here only once the pack matches its manifest (otherwise Failed(Corrupt)), so a UI keyed on Ready never reads an unverified pack. The store is asked and the pack checked on dispatcher, so a collector on the main thread never waits on Play or the disk.