aw-android
A very work-in-progress ActivityWatch app for Android.
Available on Google Play:
Usage
Install the APK from the Play Store or from the GitHub releases.
For Oculus Quest
Note At some point a Quest system upgrade broke the ability to allow ActivityWatch access to usage stats. This can be fixed by manually assigning the needed permission using adb:
adb shell appops set net.activitywatch.android android:get_usage_stats allow
It's available on SideQuest.
Building
To build this app you first need to build aw-server-rust and aw-webui (which is placed in aw-server-rust/aw-webui
).
If you haven't already, initialize the submodules with: git submodule update --init --recursive
Building aw-server-rust
Note If you don't want to go through the hassle of getting Rust up and running, you can download the jniLibs from aw-server-rust CI artifacts and place them in
mobile/src/main/jniLibs
manually instead of following this section.
Note You need to use NDK r21e (21.4.7075529).
To build aw-server-rust you need to have Rust nightly installed (with rustup). Then you can build it with:
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)
Note The Android NDK will be downloaded by
install-ndk.sh
toaw-server-rust/NDK
ifANDROID_NDK_HOME
not set. You can create a symlink pointing to the real location if you already have it elsewhere (such as /opt/android-ndk/ on Arch Linux).
Building aw-webui
To build aw-webui you need a recent version of node/npm installed. You can then build it with make aw-webui
.
Putting it all together
Once both aw-server-rust and aw-webui is built, you can build the Android app as any other Android app using Android Studio.
More info
For more info, check out the main ActivityWatch repo.