fix(android): report app version in aw-server-rust info endpoint - #239
fix(android): report app version in aw-server-rust info endpoint#239TimeToBuildBob wants to merge 1 commit into
Conversation
The footer showed "v0.14.0 (rust)" — the Cargo.toml component version — while the installed app was v0.14.0b2. Wire up the JNI entrypoint added in ActivityWatch/aw-server-rust#656: declare `setVersionOverride` as an external fun and call it with `BuildConfig.VERSION_NAME` immediately after `setDataDir`, so the `GET /api/0/info` response reports the Android release version instead of the embedded component's package version. Also bumps the aw-server-rust submodule pointer to pick up #656. Fixes item 3 of ActivityWatch#236.
Greptile SummaryThe PR reports the Android application version from the embedded Rust server’s info endpoint.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or non-blocking defects identified. The server-owning startup path constructs Important Files Changed
Reviews (1): Last reviewed commit: "fix(android): report app version in aw-s..." | Re-trigger Greptile |
|
Closing this in favour of #240, which is the same fix without two problems this version has. 1. It doesn't compile. The Test job here fails with:
2. It drops the li(v-if="!info.version.includes('rust')") #[a(:href="apiBrowserUrl") {{ $t('home.apiBrowser') }}]Reporting a bare Apologies for the duplicate — two sessions picked this up in the same few minutes. |
Fixes item 3 of #236.
Problem
The footer in the webui showed
v0.14.0 (rust)— the Cargo.toml version of the embedded aw-server-rust component — while the installed app wasv0.14.0b2. The two diverge because aw-server-rust has its own release cadence and itsCargo.tomlversion is a component version, not the Android app version.Fix
ActivityWatch/aw-server-rust#656 (merged 2026-08-25) added a
setVersionOverrideJNI entrypoint that accepts a version string and uses it verbatim inGET /api/0/info. This PR wires it up on the Android side:private external fun setVersionOverride(version: String), mirroring the existingsetDataDirpattern.init {}, immediately aftersetDataDir(context.filesDir.absolutePath), callsetVersionOverride(BuildConfig.VERSION_NAME).BuildConfig.VERSION_NAMEcarries the release version (e.g.0.14.0b2) set by the build system.aw-server-rustfrom75722f3to77defefto pick up #656.After this change
GET /api/0/inforeturns the Android release version, so the footer will readv0.14.0b2 (rust)(or whateverVERSION_NAMEthe build sets) instead of a stale Cargo version.