mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 19:08:23 +00:00
- ZapstoreUpdater subscribes to wss://relay.zapstore.dev for kind 30063 release events and kind 1063 file metadata events published by the developer. It compares the incoming version against the running BuildConfig.VERSION_NAME and exposes latestRelease as a StateFlow. - When an update is found the updater downloads the APK via OkHttp, verifies the SHA-256 hash from the event tags, and installs it via Android PackageInstaller intent using a FileProvider URI. - SettingsScreen shows a "Check for updates" row that changes to "Update available: vX.Y.Z" when a newer version is detected, with download progress and error state feedback. - All self-update code is gated behind !BuildFlavorChecker.isOfflineFlavor() so F-Droid (offline) builds are completely unaffected. - Added REQUEST_INSTALL_PACKAGES permission and FileProvider declaration to AndroidManifest.xml, and the file_provider_paths.xml resource. https://claude.ai/code/session_01NmFcCFmEbY7NMradkEU5bv
7 lines
121 B
XML
7 lines
121 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<paths>
|
|
<cache-path
|
|
name="apk_downloads"
|
|
path="." />
|
|
</paths>
|