Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
a8a0cff
chore: add 'sh' to README.md
0xbrayo Jul 18, 2024
0e40e7c
docs: update deprecated magick command
0xbrayo Jul 18, 2024
9a59f05
refactor: refactored to improve accuracy of the timeline
0xbrayo Aug 19, 2025
415b67c
feat:use device name as hostname
0xbrayo Oct 3, 2025
491fec4
chore: gradle version bump and misc
0xbrayo Oct 8, 2025
3f0d9ea
feat(android): add SyncInterface.kt with JNI bindings for aw-sync
0xbrayo Oct 16, 2025
3774591
feat(android): implement automatic background sync
0xbrayo Oct 16, 2025
617f7c5
build(deps): updated project dependencies, jvm target to 11, gradle t…
konrad-krol-incubly Sep 26, 2025
d8e26b2
feat: implemented generic web watcher with support of multiple web br…
konrad-krol-incubly Sep 26, 2025
c4dccb4
feat: always active in the background
0xbrayo Nov 24, 2025
c83b255
chore: minimum api target bump
0xbrayo Nov 26, 2025
cb9e7d0
feat: experimental parsing of events in background
0xbrayo Dec 11, 2025
a49078a
fix: fix launch on boot not working
0xbrayo Dec 11, 2025
590080c
build: update makefile to package aw-sync.so
0xbrayo Dec 22, 2025
29a5559
fix: fix single-instance errors on android
0xbrayo Dec 23, 2025
17a3435
fix: fix doNotStrip property not working
0xbrayo Jan 2, 2026
9bf51ee
Update mobile/src/main/java/net/activitywatch/android/watcher/WebWatc…
0xbrayo Jan 2, 2026
2413786
style: fix linting warrnings
0xbrayo Jan 11, 2026
ecd635f
chore: replace the default android.jks.age
0xbrayo Sep 4, 2024
f0c39f5
feat: add sync support methods to RustInterface
0xbrayo Jan 30, 2026
4db1634
refactor: improve RustInterface initialization
0xbrayo Jan 31, 2026
e4b9653
chore: update aw-server-rust submodule reference
0xbrayo Jan 31, 2026
bede20d
feat: implement category time widget
0xbrayo Jan 31, 2026
f713963
feat: enhance widget with visual indicators
0xbrayo Feb 1, 2026
1c9535d
feat: implement widget background worker
0xbrayo Feb 8, 2026
41a72cf
refactor: optimize widget layout for 4x1 size
0xbrayo Feb 9, 2026
d2bee9c
feat: add widget refresh animation
0xbrayo Feb 9, 2026
da5d4ba
refactor: simplify widget styling and worker logic
0xbrayo Feb 12, 2026
4ebbff6
feat: media watcher
0xbrayo Feb 27, 2026
bdd82d1
feat: bump ci versions
0xbrayo Mar 17, 2026
6bd790b
fix(ci): update sdkmanager, avdmanager, and emulator paths for setup-…
0xbrayo Mar 17, 2026
fc1880e
fix(ci): remove fail-on-cache-miss from cache restore
0xbrayo Mar 17, 2026
a352caa
fix(ci): restore missing path key and set fail-on-cache-miss: false i…
0xbrayo Mar 17, 2026
5dcdf28
refactor(ci): replace manual emulator setup with reactivecircus/andro…
0xbrayo Mar 18, 2026
62a70d6
fix(ci): launch app, sleep 1s, screenshot and logcat in emulator-runn…
0xbrayo Mar 18, 2026
ea11096
fix(ci): correct am start intent to use debug package + full class name
0xbrayo Mar 18, 2026
9010a23
fix(ci): install apk explicitly and use monkey to launch app before s…
0xbrayo Mar 18, 2026
4847836
fix(ci): bypass onboarding, grant usage stats perm, unlock screen bef…
0xbrayo Mar 18, 2026
0460d92
fix(ci): pass jniLibs via artifact upload/download instead of cache
0xbrayo Mar 18, 2026
fff5c4e
chore: update settings.gradle
0xbrayo Mar 19, 2026
729d176
feat: update widget every 15 mins
0xbrayo Mar 20, 2026
4b22a5d
feat: update widget every 5 mins
0xbrayo Mar 21, 2026
ef77f4f
feat: unlock watcher
0xbrayo Mar 21, 2026
612734c
chore: linting diff
0xbrayo Mar 24, 2026
ca8c2d4
feat: migrate legacy db hostnames
0xbrayo Mar 26, 2026
eac363d
ci: skip secrets-dependent steps on fork PRs
TimeToBuildBob May 21, 2026
01a0559
fix(sync): handle missing aw-sync library
TimeToBuildBob May 21, 2026
b64e00a
fix(ci): stop masking e2e failures
TimeToBuildBob May 22, 2026
1a493cf
fix(sync): avoid replaying last session event
TimeToBuildBob May 22, 2026
8fc1f1c
fix(ci): preinstall ndk before emulator runner
TimeToBuildBob May 22, 2026
eecff35
fix: address two greptile P1 findings
TimeToBuildBob May 22, 2026
07875a1
fix(ci): use default emulator target to avoid google_apis flakiness
TimeToBuildBob May 22, 2026
8f0a1e6
fix(ci): skip deprecated 'tools' package in setup-android@v3
0xbrayo Jul 1, 2026
c846da7
fix: rename production bucket from aw-watcher-android-test to aw-watc…
0xbrayo Jul 1, 2026
e586323
fix: use KEEP policy for EventParsingWorker, remove dead widget code
0xbrayo Jul 1, 2026
37c5f49
fix: address greptile review feedback (greploop iteration 1)
0xbrayo Jul 1, 2026
7380787
fix: dispatch onUpdate off main thread to avoid ANR (greploop iterati…
0xbrayo Jul 1, 2026
12998cb
fix: prevent duplicate session insertion from concurrent callers (gre…
0xbrayo Jul 1, 2026
9643b5d
fix: pass foreground service type to startForeground on Android 14+ (…
0xbrayo Jul 1, 2026
086956e
fix: register SyncAlarmReceiver in manifest (greploop iteration 5)
0xbrayo Jul 1, 2026
d7153d2
fix: prevent async work from being orphaned in SyncAlarmReceiver (gre…
0xbrayo Jul 1, 2026
e462e90
fix: bind session-event coroutine to Activity lifecycle; remove dual …
0xbrayo Jul 1, 2026
e02664e
fix: restore background collection for session mode via goAsync in Al…
0xbrayo Jul 1, 2026
9ce0c10
fix: prevent concurrent syncs and unconditional hostname migration mark
0xbrayo Jul 1, 2026
1d58626
fix: wire AlarmManager fallback in SyncScheduler so SYNC_ALARM is rea…
0xbrayo Jul 1, 2026
c006b88
fix: run hostname migration off main thread to avoid ANR; fix midnigh…
0xbrayo Jul 1, 2026
48dd13d
fix: restore widget periodic alarm in onUpdate (covers post-reboot case)
0xbrayo Jul 1, 2026
a32db06
fix: recycle AccessibilityNodeInfo in WebWatcher.findWebView (API 26-…
0xbrayo Jul 1, 2026
e8e39a9
fix: move MediaWatcher polling and JNI heartbeat off main thread
0xbrayo Jul 1, 2026
4c48f0e
fix: prevent concurrent syncBoth() JNI calls via shared AtomicBoolean
0xbrayo Jul 1, 2026
88f8dda
fix: parse migrateHostname result as JSON instead of string-contains
0xbrayo Jul 1, 2026
3536478
fix: pin all MediaWatcher callbacks to handlerThread to prevent data …
0xbrayo Jul 1, 2026
413039c
fix: add lifecycle-runtime-ktx dep, move SyncInterface init off main …
0xbrayo Jul 1, 2026
f285f52
fix: keep AlarmManager fallback alarm alive when BackgroundService stops
0xbrayo Jul 1, 2026
fb3a01e
fix: guard EventParsingWorker against epoch-0 cursor reset on cold se…
0xbrayo Jul 1, 2026
b4e972d
fix: remove test() debug method, clarify insertEvent KDoc, document s…
0xbrayo Jul 1, 2026
4bc4205
fix: use conservative defaults for hostname migration success detection
0xbrayo Jul 1, 2026
62cf97d
fix: distinguish server-down from fresh-install in EventParsingWorker…
0xbrayo Jul 1, 2026
8b71d73
fix: remove dead CategoryTimeWidgetWorker and move SyncInterface init…
0xbrayo Jul 1, 2026
958f68d
ci: fail hard on jniLibs cache miss instead of silently skipping tests
0xbrayo Jul 1, 2026
b9cbd69
fix: remove bulk-import helpers with no deduplication guard
0xbrayo Jul 1, 2026
1060908
fix: remove getTodayTimeline() that called deleted getTimelineForDay()
0xbrayo Jul 1, 2026
2ef1d45
fix: use ConcurrentHashMap in MediaWatcher to prevent map-modificatio…
0xbrayo Jul 1, 2026
28a97e4
fix: drop unused SCHEDULE_EXACT_ALARM permission
0xbrayo Jul 1, 2026
c9e17b4
fix: prevent overlapping-session double-count in SessionParser
0xbrayo Jul 1, 2026
a5a560e
fix: handle alarm errors and test JNI artifact restore
TimeToBuildBob Jul 1, 2026
f6989a0
fix: restore SCHEDULE_EXACT_ALARM permission for widget updates
0xbrayo Jul 1, 2026
3e6d87b
refactor: dedupe bucket-id constants and guard EventParsingWorker on …
0xbrayo Jul 1, 2026
1968672
fix: move MediaWatcher bucket init off main thread; recycle WebWatche…
0xbrayo Jul 1, 2026
08ff09c
fix(ci): stabilize aw-android web watcher e2e
TimeToBuildBob Jul 1, 2026
44c6c77
fix(ci): keep e2e runner script in one shell
TimeToBuildBob Jul 2, 2026
2a369d6
fix(ci): avoid multi-line shell construct in e2e runner script
TimeToBuildBob Jul 2, 2026
ef77947
fix(service): call startForeground() in onCreate() to avoid 5s OS tim…
TimeToBuildBob Jul 2, 2026
757c3ec
Revert "fix(ci): avoid multi-line shell construct in e2e runner script"
TimeToBuildBob Jul 2, 2026
331af3f
fix(ci): call startForeground() before native init to avoid 5s ANR
TimeToBuildBob Jul 2, 2026
310747d
fix(media): handle bucket init failures
TimeToBuildBob Jul 2, 2026
8747d8e
fix(web): guard WebWatcher bucket initialization
TimeToBuildBob Jul 2, 2026
c4776a1
fix(activity): skip main startup during onboarding
TimeToBuildBob Jul 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
323 changes: 97 additions & 226 deletions .github/workflows/build.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 28 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ export ON_ANDROID := -- --android
aw-server-rust: $(JNILIBS)

.PHONY: $(JNILIBS)
$(JNILIBS): $(JNI_arm7)/libaw_server.so $(JNI_arm8)/libaw_server.so $(JNI_x86)/libaw_server.so $(JNI_x64)/libaw_server.so
$(JNILIBS): $(JNI_arm7)/libaw_server.so $(JNI_arm8)/libaw_server.so $(JNI_x86)/libaw_server.so $(JNI_x64)/libaw_server.so \
$(JNI_arm7)/libaw_sync.so $(JNI_arm8)/libaw_sync.so $(JNI_x86)/libaw_sync.so $(JNI_x64)/libaw_sync.so
@ls -lL $@/*/* # Check that symlinks are valid

# There must be a better way to do this without repeating almost the same rule over and over?
Expand All @@ -170,6 +171,20 @@ $(JNI_x64)/libaw_server.so: $(TARGETDIR_x64)/$(RELEASE_TYPE)/libaw_server.so
mkdir -p $$(dirname $@)
if [ -z "$(TARGET)" ] || [ "$(TARGET)" == "x86_64" ]; then ln -fnv $$(pwd)/$^ $@; fi

$(JNI_arm7)/libaw_sync.so: $(TARGETDIR_arm7)/$(RELEASE_TYPE)/libaw_sync.so
mkdir -p $$(dirname $@)
# if target is empty, then create symlink
if [ -z "$(TARGET)" ] || [ "$(TARGET)" == "arm" ]; then ln -fnv $$(pwd)/$^ $@; fi
$(JNI_arm8)/libaw_sync.so: $(TARGETDIR_arm8)/$(RELEASE_TYPE)/libaw_sync.so
mkdir -p $$(dirname $@)
if [ -z "$(TARGET)" ] || [ "$(TARGET)" == "arm64" ]; then ln -fnv $$(pwd)/$^ $@; fi
$(JNI_x86)/libaw_sync.so: $(TARGETDIR_x86)/$(RELEASE_TYPE)/libaw_sync.so
mkdir -p $$(dirname $@)
if [ -z "$(TARGET)" ] || [ "$(TARGET)" == "x86" ]; then ln -fnv $$(pwd)/$^ $@; fi
$(JNI_x64)/libaw_sync.so: $(TARGETDIR_x64)/$(RELEASE_TYPE)/libaw_sync.so
mkdir -p $$(dirname $@)
if [ -z "$(TARGET)" ] || [ "$(TARGET)" == "x86_64" ]; then ln -fnv $$(pwd)/$^ $@; fi

RUSTFLAGS_ANDROID="-C debuginfo=2 -Awarnings"
# Explanation of RUSTFLAGS:
# `-Awarnings` allows all warnings, for cleaner output (warnings should be detected in aw-server-rust CI anyway)
Expand All @@ -192,6 +207,17 @@ $(RS_SRCDIR)/target/%/$(RELEASE_TYPE)/libaw_server.so: $(RS_SOURCES) $(WEBUI_DIS
env RUSTFLAGS=$(RUSTFLAGS_ANDROID) make -C aw-server-rust android; \
fi

# Same rule for libaw_sync.so (but without webui dependency)
$(RS_SRCDIR)/target/%/$(RELEASE_TYPE)/libaw_sync.so: $(RS_SOURCES)
@echo $@
@echo "Release type: $(RELEASE_TYPE)"
@if [ "$$USE_PREBUILT" == "true" ] && [ -f $@ ]; then \
echo "Using prebuilt libaw_sync.so"; \
else \
echo "Building libaw_sync.so from aw-server-rust repo"; \
env RUSTFLAGS=$(RUSTFLAGS_ANDROID) make -C aw-server-rust android; \
fi

# aw-webui
.PHONY: $(WEBUI_DISTDIR)
$(WEBUI_DISTDIR):
Expand All @@ -210,4 +236,4 @@ clean:

.PHONY: fastlane/metadata/android/en-US/images/icon.png
fastlane/metadata/android/en-US/images/icon.png: aw-server-rust/aw-webui/media/logo/logo.png
convert $< -resize 75% -gravity center -background white -extent 512x512 $@
magick $< -resize 75% -gravity center -background white -extent 512x512 $@
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If you haven't already, initialize the submodules with: `git submodule update --

To build aw-server-rust you need to have Rust nightly installed (with rustup). Then you can build it with:

```
```sh
export ANDROID_NDK_HOME=`pwd`/aw-server-rust/NDK # The path to your NDK
pushd aw-server-rust && ./install-ndk.sh; popd # This configures the NDK for use with Rust, and installs the NDK if missing
env RELEASE=false make aw-server-rust # Set RELEASE=true to build in release mode (slower build, harder to debug)
Expand Down
Binary file modified android.jks.age
Binary file not shown.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.7.20'
ext.androidXTestVersion = '1.5.0'
ext.espressoVersion = '3.5.0'
ext.extJUnitVersion = '1.1.4'
ext.kotlin_version = '1.9.0'
ext.androidXTestVersion = '1.7.0'
ext.espressoVersion = '3.7.0'
ext.extJUnitVersion = '1.3.0'
ext.servicesVersion = '1.4.2'
repositories {
google()
Expand All @@ -14,7 +14,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'com.android.tools.build:gradle:8.13.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3'

Expand Down
Binary file modified fastlane/metadata/android/en-US/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ org.gradle.jvmargs=-Xmx1536m
kotlin.code.style=official
android.useAndroidX=true
android.enableJetifier=true

# Enable native symbol preservation for debugging
# doNotStrip=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 4 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#Fri Sep 26 14:49:59 CEST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading