Skip to content

feat(updater): silent background download and in-app install progress dialog - #3214

Closed
codeiva11 wants to merge 1 commit into
recloudstream:masterfrom
codeiva11:feat/silent-update-progress-dialog
Closed

codeiva11 wants to merge 1 commit into
recloudstream:masterfrom
codeiva11:feat/silent-update-progress-dialog

Conversation

@codeiva11

Copy link
Copy Markdown

Summary

Improves the in-app update flow by pre-downloading update APKs quietly in the background and adding an in-app progress dialog during installation.

Key Changes

  1. Silent Background Download: In \InAppUpdater.kt, \downloadUpdateSilently\ downloads the update APK to internal cache without throwing foreground notifications while browsing/watching.
  2. Post-Download Dialog: The update prompt (Update, Cancel, Skip) is only shown after the file is fully ready, preventing wait times upon clicking Update.
  3. In-App Progress Feedback: Added \UpdateProgressActivity\ with layout \update_progress_dialog.xml\ that observes installation progress broadcasted from \PackageInstallerService\ (\PROGRESS_UPDATE_ACTION\ / \STATUS_UPDATE_ACTION), displaying a 0%–100% horizontal progress bar and status text.
  4. Local File Staging in Service: Added \installFromFile\ in \PackageInstallerService\ to handle direct session writing from the cached APK file.
  5. Compatibility: Preserved legacy installer fallback for MIUI/HyperOS devices.

Verification

  • Tested and verified build: ./gradlew assemblePrereleaseDebug\ succeeded (output APK generated).
  • Ran ./gradlew library:checkKotlinAbi\ to ensure binary compatibility.

@LagradOst

Copy link
Copy Markdown
Contributor

Good pull request! Just please be aware that this has already been fixed in #3204

@codeiva11

Copy link
Copy Markdown
Author

"Thanks for the heads-up @LagradOst! I reviewed #3204—the new Compose UI and GithubViewModel refactor look great.

The main enhancement in this PR (#3214) was implementing silent background pre-downloading (downloading the update APK quietly first, then prompting the user so clicking 'Update' triggers immediate installation without download wait-times).

Since #3204 overhauls the updater architecture, I will close this PR and rebase/port the silent background pre-download & cached installation logic directly onto your #3204 Compose branch (GithubViewModel / ApkUpdater)."

@codeiva11

Copy link
Copy Markdown
Author

Thanks for the heads-up @LagradOst! I reviewed #3204—the new Compose UI and GithubViewModel refactor look really clean.

The main intent behind this PR was introducing silent background pre-downloading (fetching the update APK quietly in the background first, so that when the update prompt is shown, clicking 'Update' installs immediately with zero download wait time).

Since #3204 refactors the entire updater foundation, I will close this PR and port the silent background pre-download & cached install logic on top of your #3204 Compose branch.

@codeiva11 codeiva11 closed this Sep 25, 2026
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.

2 participants