Skip to content

feat(updater): silent background pre-download and instant install for Compose updater - #3220

Open
codeiva11 wants to merge 1 commit into
recloudstream:masterfrom
codeiva11:feat/silent-compose-updater
Open

codeiva11 wants to merge 1 commit into
recloudstream:masterfrom
codeiva11:feat/silent-compose-updater

Conversation

@codeiva11

Copy link
Copy Markdown

Summary

Builds directly on top of the newly merged Compose updater (#3204) by introducing silent background pre-downloading and immediate installation from cached APKs with real-time in-app progress.

What this adds to the Compose updater

  1. Silent Background Pre-download:

    • In \ApkUpdater.kt, added \downloadSilently\ to fetch updates quietly in the background without UI interruption during automated checks (\AutoSearchForUpdate).
    • The user is only prompted once the APK is fully downloaded and verified on disk.
  2. Instant Installation from Cache:

    • In \GithubViewModel.kt, clicking Update checks if the APK is already pre-downloaded in internal cache.
    • If present, \ApkUpdater.installFromFile\ immediately writes to \PackageInstaller.Session\ without download wait times.
    • Falls back gracefully to standard live download if cache is missing.
  3. In-App Installation Progress in Compose:

    • Added \GithubUpdateDialogState.InstallProgress\ to \MainActivityScreen.kt.
    • Displays real-time 0%–100% horizontal progress while writing to the session.
    • Re-enabled \AutoSearchForUpdate\ on \MainActivityScreen\ to allow automated background update discovery.
  4. Cache Clean-up on Skip:

    • When the user chooses Skip Update, the pre-downloaded APK is immediately deleted from the cache to preserve storage.

Verification

  • Tested compilation: ./gradlew compilePrereleaseDebugKotlin\ (Build Successful).
  • Verified Kotlin ABI compatibility: ./gradlew library:checkKotlinAbi\ (Passed).
  • Verified Unit Tests: ./gradlew testPrereleaseDebugUnitTest\ (Passed).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant