From a34b12c2f4867def84824f8c54e7a03dc42627b4 Mon Sep 17 00:00:00 2001 From: TimeToBuildBob Date: Tue, 25 Aug 2026 10:56:24 +0000 Subject: [PATCH] fix(android): report app version in aw-server-rust info endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/aw-android#236. --- aw-server-rust | 2 +- mobile/src/main/java/net/activitywatch/android/RustInterface.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/aw-server-rust b/aw-server-rust index 75722f3c..77defefd 160000 --- a/aw-server-rust +++ b/aw-server-rust @@ -1 +1 @@ -Subproject commit 75722f3c51269615fbd2ffaf2a946824d7cc8ccd +Subproject commit 77defefd4945ecceedc417eea711c2613b451f2e diff --git a/mobile/src/main/java/net/activitywatch/android/RustInterface.kt b/mobile/src/main/java/net/activitywatch/android/RustInterface.kt index e3b56743..d4289a1a 100644 --- a/mobile/src/main/java/net/activitywatch/android/RustInterface.kt +++ b/mobile/src/main/java/net/activitywatch/android/RustInterface.kt @@ -33,6 +33,7 @@ class RustInterface(context: Context? = null) { initialize() if (context != null) { setDataDir(context.filesDir.absolutePath) + setVersionOverride(BuildConfig.VERSION_NAME) } } @@ -44,6 +45,7 @@ class RustInterface(context: Context? = null) { private external fun greeting(pattern: String): String private external fun startServer() private external fun setDataDir(path: String) + private external fun setVersionOverride(version: String) external fun getBuckets(): String external fun createBucket(bucket: String): String external fun getEvents(bucket_id: String, limit: Int): String