Repository navigation
Conversation
- Release stamps record their commit time, which is also the APK's versionCode, so a release offers its sand.apk with the version code it carries. - Updates in Settings shows a This app row inside the Android app; Update app downloads the APK, checks its SHA-256, asks to allow installs if needed, and opens Android's installer.
Performance: ✅ every row is within its limitMain
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Android app finds a newer
sand.apkon the release its PC follows, downloads it and opens Android's installer.What
sand-build.json) now recordcommittedAt, the HEAD commit time. The Android build already uses that time in seconds as itsversionCode.updatesreads thesand.apkasset of the release it found for the PC's channel and putsandroid: { url, sha256, versionCode }onReleaseInfo. No new GitHub lookups and no second channel setting: the app follows the same release and channel as PC updates.versionCodeto the page insandAppStart. Inside the app, Settings › Updates gets a This app section. It offers Update app only when the release's APK has a higher version code, so it never offers a downgrade Android would refuse. The Updates dot lights up for it too.installmessage to the app. The app:canRequestPackageInstalls()and opensACTION_MANAGE_UNKNOWN_APP_SOURCESfor sand if installs aren't allowed yet, then carries on once they are;cache/update/sand.apk, sending progress by whole percent;FileProvidercontent://URI (REQUEST_INSTALL_PACKAGESis now in the manifest).Why
Verification
./gradlew testDebugUnitTest: new Robolectric tests for the download (bytes, progress up to 100%, bad checksum thrown away), the install-permission intent and the installer intent. On Windows, the installer-intent test fails inside androidxFileProvider, which only matches/path separators. It passes on Linux CI../gradlew assembleDebug assembleReleasebuilt both APKs.aapt2 dumpshowsREQUEST_INSTALL_PACKAGESand thedev.vaakx.sand.filesprovider in the release manifest.lintDebugreports nothing new; its one error is the existing one inPush.kt.bunx tsc,vrui-check,scripts/deps.ts,scripts/comments.ts, plusbun teston updates, update-banner, devices, release and util: all pass. New tests cover APK asset selection infindReleaseand the version comparison.buildHistoryon this checkout.committedAtmatchesgit log -1 --format=%ct× 1000.committedAtyet, so the first release after this merges is the first one the app can update to.