Repository navigation
User feedback on v0.14.02b #247
Description
Activity
Addressed the two concrete breakage reports from the v0.14.0b2 feedback:
-
Sync 401 / empty SAF folder — Android
get_client()inaw-syncnever forwarded[auth].api_keyfromfilesDir/config.toml, soGET /api/0/bucketsreturned 401. Fix: fix(aw-sync): forward API key on Android JNI client aw-server-rust#666. Needs a submodule bump in this repo after that merges. -
In-app category import opens camera/gallery, no document picker —
WebUIFragmenthad noWebChromeClient.onShowFileChooser. Fix: fix(webview): open a document picker for untyped file inputs #248.
Not in these PRs (still open on this issue):
- Sync settings discoverability (left-swipe only) and last-sync / success-fail UI.
- Category import save: browser mode "breaks after saving" and defaults coming back. Likely a separate webui persist path; the importer also rejects non-
application/jsonMIME types, which Android often reports asapplication/octet-streameven for.json. - Related: Sync aborts the app process (SIGABRT in libaw_sync.so) on Android 16 — syncBoth and syncPush alike #220 (sync SIGABRT on Android 16) — distinct from the 401.
I did not bump
aw-server-rustin this repo yet; that waits on #666 merging.-
- added a commit that references this issue
on Aug 31, 2026 ActivityWatch/aw-server-rust#666 merged. Submodule bump +
SyncInterface.setDataDir: #249.Still open here: sync UX/discoverability, category-import save persistence, #220 SIGABRT.
- added a commit that references this issue
on Aug 31, 2026 - added a commit that references this issue
on Aug 31, 2026 Also I've noticed that the "Activity" in the hamburger menu and the one you can access by swiping left behave differently. The first one works as expected, while the second one opens the same activity page, but with the host name
unknownand default views (not specific to Android). Because of this, the visualizations don't work there.Confirmed — the left-swipe Activity item (and notification taps) hardcoded
/#/activity/unknown/. The hamburger builds/activity/<real-hostname>from buckets, which is why that path gets Android visualizations.Fix: #250. Drawer + notification now use the same sanitized device hostname as the Android buckets.
Still open here: sync UX/discoverability, last-sync/success-fail UI, category-import save persistence. Sync 401 is #249 (awaiting maintainer merge).
- added a commit that references this issue
on Aug 31, 2026 The three concrete breakages are now merged:
- fix(webview): open a document picker for untyped file inputs #248: embedded category import opens a document picker.
- fix(sync): pick up aw-server-rust API-key JNI client and set data dir #249: sync forwards the dashboard API key and reads the right app config.
- fix(android): open Activity view with device hostname, not unknown #250: drawer/notification Activity links use the real device hostname.
I also opened #251 for the remaining sync-feedback gap. It persists and shows the last full-sync timestamp plus success/failure, and no longer treats a failed configured-directory mirror as a successful worker sync. Full JVM unit suite passes locally; CI is running.
Still unresolved from the original report: category-import save persistence (defaults returning after save). I am leaving #247 open until that path is reproduced and fixed rather than claiming the merged pieces close the whole report.
Remaining category-import persistence from the original report:
- In-app import still silently no-op'd after fix(webview): open a document picker for untyped file inputs #248 when Android reported the
.jsonfile asapplication/octet-stream/ empty MIME. - Save could persist defaults:
import()did not synccategory_sets, andsave()raced two un-awaited settings updates.
Fix: ActivityWatch/aw-webui#956. Import accepts Android-ambiguous JSON MIME types with a visible error, and save is a single awaited persist. The Android app still needs an
aw-webuisubmodule bump after that merges; leaving #247 open until then.Sync feedback remains #251 (CI-green, waiting on a maintainer merge).
- In-app import still silently no-op'd after fix(webview): open a document picker for untyped file inputs #248 when Android reported the
Follow-up to the Activity-view report above (#250): fixing the hostname doesn't make the
Activity view show data on master builds, there's a second independent cause.Even with the correct host in the URL, Activity reports
Time active: 0sand
Top Applications: No datawhile the Timeline shows events for the same host and day.
aw-webui'scanonicalEventsmerges Android events by["app", "title"], and
aw-watcher-androidevents have notitlekey, somerge_events_by_keysdrops every one
of them and the whole day evaluates to zero.Regression from aw-webui
bf0fc84(2026-07-24). Not in v0.14.0b2 — that pins
aw-server-rust e8e6e90→aw-webui 749585f, which predates it. aw-android master pins
aw-server-rust 2ded7d7→aw-webui 3cbe349, which contains it, so master builds are
affected.Details, measurements and a suggested fix: ActivityWatch/aw-webui#959
Thanks @Judemasic — root-cause confirmed and fix is up.
ActivityWatch/aw-webui#960 — restores the Android Activity view by fixing both merge-key sites in
queries.ts.The short version:
bf0fc84added"title"to themerge_events_by_keyscall for the Android path to support iOS ScreenTime, butaw-watcher-androidevents never carry atitlekey.merge_events_by_keysin aw-server-rust silently skips any event missing a requested key, so every Android event was dropped and the Activity view showed 0s. The fix gates"title"on anisIosflag; the regular watcher path goes back to["app"].The v0.14.0b2 release pins an older aw-webui that predates the regression, so only master builds are affected.
- added a commit that references this issue
on Sep 3, 2026 - added a commit that references this issue
on Sep 3, 2026 - added a commit that references this issue
on Sep 3, 2026 Description:
On the OnePlus 7 with ActivityWatch Android app v0.14.02b, the live timeline updates correctly while the app is open. However, once the app is closed (swiped away or force-stopped), the web UI at localhost:5600 no longer shows new events for the Android bucket. Furthermore, when attempting to download the bucket data via the API (e.g., /api/0/buckets//events), the resulting JSON file is empty specifically for events whose start time falls after the app was closed. Re‑opening the app forces all “missed” events to appear in both the UI and the API response.Steps to Reproduce:
- Open ActivityWatch on the Android device (OnePlus 7, app version v0.14.02b) and verify that new activity appears in the live timeline.
- Close the app completely (e.g., swipe it away from the recent apps list or force‑stop it).
- Wait a few minutes for new activity to occur (this activity should generate new events).
- Open a browser and go to localhost:5600 – observe that the Android bucket timeline shows no updates after the app was closed.
- Using the API, request the bucket’s events, e.g., GET /api/0/buckets//events?start=... (or download via the web UI’s export function).
- Note that the returned JSON is empty, or contains only events that predate the app closure – any events that should have started after the closure are missing.
- Re‑open the Android app – all events that were missing suddenly appear in the web UI and become available via the API.
Expected Behavior:
- The Android bucket data should be continuously persisted to disk or made available to the server, so that the web UI and API reflect the latest events even when the app is not in the foreground.
- Exporting the bucket via API should always return all recorded events, including those that occurred while the app was closed.
Actual Behavior:
- No new events are visible in the web UI or API after the app is closed.
- The API returns an empty JSON file (or missing events) specifically for the time interval starting from the moment the app was closed.
- Only after restarting the app are the buffered events flushed to the server/database.
Environment:
Device: OnePlus 7
OS: Android 12
App Version: v0.14.02b
Server/Web UI: localhost:5600 (latest version)Thanks @Ansar-04 — split this out as #252 so it has its own reproduction and acceptance criteria.
The “missed events appear after reopening” behavior means Android still has the usage history, but ActivityWatch's local server/parser was not running to persist and expose it. v0.14.0b2 already uses a foreground
BackgroundService, returnsSTART_STICKY, and does not opt intostopWithTask, so this needs lifecycle evidence on the affected OnePlus/OxygenOS device rather than a speculative restart patch.One important distinction:
- Swipe away from recents: the service should survive or recover; this is the bug tracked in Local server stops after swipe-away until app is reopened #252.
- Force-stop from Android settings: Android intentionally blocks the app's services, alarms, and restarts until the user launches it again. ActivityWatch cannot bypass that platform behavior.
Could you confirm whether the persistent ActivityWatch notification disappears after a swipe-away only (not force-stop)? #252 includes a filtered
adb logcatcommand that will tell us whether the service is destroyed, the process is killed, or the native server exits while the service remains alive.- added a commit that references this issue
on Sep 5, 2026
User wrote on discord
Then later
@TimeToBuildBob address these issues