Skip to content

feat: Android in-app APK auto-update with download progress modal#159

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/implement-auto-update-android
Draft

feat: Android in-app APK auto-update with download progress modal#159
Copilot wants to merge 4 commits intomainfrom
copilot/implement-auto-update-android

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 20, 2026

Adds Android-only auto-update support: instead of redirecting to the GitHub releases page, the app downloads the APK directly and triggers the system installer — with a clean progress modal for the download step.

GitHub API

  • Added GithubReleaseAsset type; GithubRelease.assets now populated from API response
  • pickApkAsset() helper selects the best APK from release assets (prefers arm64, excludes TV builds)

Core hook — useAndroidApkInstall

  • Manages full download lifecycle (idle → downloading → ready → error) with cancellation and 0–1 progress via expo-file-system/legacy
  • Triggers install via FileSystem.getContentUriAsync + Linking.openURL (no new native dependencies)

UI

  • ApkInstallModal — minimal download-progress modal: contextual icon, filename, ProgressBar, percentage, Cancel / Install actions; no-ops on non-Android
  • GithubReleaseModal — shows "Download & Install" on Android when an APK asset is present; renders ApkInstallModal for the progress step
  • AboutSettingsContent — "Download & Install" row in the Releases card (Android only, update available)

Permissions / config

  • Added android.permission.REQUEST_INSTALL_PACKAGES to app.config.ts
  • Added expo-file-system as an explicit package.json dependency (was transitive)
Original prompt

start

[Chronological Review: The conversation began with the user requesting a plan for implementing auto-updating functionality for an Android app, including user permissions and an update button. The user then expressed a preference for a cleaner second modal. Following this, the user requested to start the implementation and create a pull request (PR). The user later canceled this request, delegating the task to a cloud agent.]

[Intent Mapping:

  1. "how can we implement auto-updating (only for android)..." - User seeks a plan for auto-updating an Android app.
  2. "second modal is cleaner" - User prefers a cleaner design for the second modal.
  3. "Start implementation" - User wants to initiate the implementation of the auto-update feature.
  4. "start implementation and create PR" - User requests to begin implementation and create a pull request.
  5. "Cancel: 'Delegate to cloud agent'" - User decides to delegate the task to a cloud agent.]

[Technical Inventory:

  • Auto-updating functionality for Android apps.
  • User permission handling for app installations.
  • Integration with GitHub releases to fetch APKs for updates.
  • Modal design considerations for user interface.]

[Code Archaeology: No specific files or code changes were discussed in detail during this conversation.]

[Progress Assessment:

  • Completed Tasks: User has outlined the requirements for the auto-update feature.
  • Partially Complete Work: Implementation was requested but not started before the task was delegated.]

[Context Validation: All necessary context for continuing the work on the auto-update feature is captured, including user preferences for UI design and the decision to delegate the task.]

[Recent Commands Analysis:

  • Last Agent Commands: "start implementation and create PR" followed by "Cancel: 'Delegate to cloud agent'".
  • Tool Results Summary: No specific tool results were generated as the implementation was not initiated before the task was canceled.
  • Pre-Summary State: The agent was preparing to start the implementation of the auto-update feature when the user decided to delegate the task.
  • Operation Context: The commands were executed in the context of implementing an auto-update feature for an Android app, reflecting the user's goal of enhancing app functionality.]
1. Conversation Overview: - Primary Objectives: - "how can we implement auto-updating (only for android)..." - User seeks a plan for auto-updating an Android app. - "second modal is cleaner" - User prefers a cleaner design for the second modal. - "Start implementation" and "start implementation and create PR" - User requests to initiate the implementation and create a pull request. - "Cancel: 'Delegate to cloud agent'" - User decides to delegate the task to a cloud agent. - Session Context: The conversation flowed from planning the auto-update feature to discussing UI preferences, followed by requests to start implementation and ultimately delegating the task. - User Intent Evolution: The user initially sought to implement a feature, then refined UI preferences, and finally opted to delegate the task.
  1. Technical Foundation:
  • Auto-updating functionality: Aimed at allowing the app to update itself by fetching APKs from GitHub releases.
  • User permission handling: Ensuring the app can install updates with user consent.
  1. Codebase Status:
  • No specific files or code changes were discussed in detail during this conversation.
  1. Problem Resolution:
  • Issues Encountered: No specific technical problems were identified, but the user expressed a need for a cleaner UI.
  • Solutions Implemented: No solutions were implemented as the task was delegated before any coding began.
  • Debugging Context: No ongoing troubleshooting efforts were noted.
  • Lessons Learned: User preferences for UI design were highlighted.
  1. Progress Tracking:
  • Completed Tasks: User outlined requirements for the auto-update feature.
  • Partially Complete Work: Implementation was requested but not started before the task was delegated.
  1. Active Work State:
  • Current Focus: The user was focused on implementing the auto-update feature for the Android app.
  • Recent Context: The last few exchanges involved requests to start implementation and create a PR, followed by a cancellation to delegate the task.
  • Working Code: No specific code snippets were discussed recently.
  • Immediate Context: The user was preparing to start implementation when the task was canceled.
  1. Recent Operations:
  • Last Agent Commands: "start implementation and create PR", "Cancel: 'Delegate to cloud agent'".
  • Tool Results Summary: No specific tool results were generated as the implementation was not initiated.
  • Pre-Summary State: The agent was preparing to start the implementation of the auto-update feature when the user decided to delegate the task.
  • Operation Context: The commands were executed in the context of implementing an auto-update feature for an Android app.
  1. Co...

Created from VS Code.

Copilot AI and others added 3 commits April 20, 2026 16:35
Copilot AI changed the title [WIP] Implement auto-updating functionality for Android app feat: Android in-app APK auto-update with download progress modal Apr 20, 2026
Copilot AI requested a review from Kombustor April 20, 2026 16:39
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