In preparation for publishing the source publicly: without a license file the code would default to all-rights-reserved, so nobody could legally use or modify it. Add the GPL v3 text, a license section in the README, and REUSE-style SPDX headers in every Kotlin source and Gradle build script so per-file licensing is machine-readable. The bundled JetBrains Mono font stays under its own SIL Open Font License 1.1, whose text must accompany redistribution. OFL.txt lives at the repo root rather than next to the fonts because aapt rejects non-font files in res/font.
3.1 KiB
Pacer
A native Android pacing/metronome app that plays 880 Hz beeps at a user-set BPM to maintain walking pace. Runs in the background for 2+ hour walks without draining battery. Plays alongside other audio apps (podcasts, music) without requesting audio focus.
Ported from the web version at https://jeena.net/pacer/
Building on Arch Linux
1. Install Java 17
sudo pacman -S jdk17-openjdk
Set JAVA_HOME (add to ~/.bashrc or ~/.zshrc):
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
export PATH="$JAVA_HOME/bin:$PATH"
Verify: java -version should show openjdk version "17.x.x".
2. Install Android SDK via AUR
# Remove old package if previously installed (it leaves files behind — clean them up too)
sudo pacman -Rns android-sdk
sudo rm -rf /opt/android-sdk/platform-tools /opt/android-sdk/tools
# Install modern SDK tools
paru -S android-sdk-cmdline-tools-latest android-sdk-platform-tools android-sdk-build-tools android-platform
The packages install to /opt/android-sdk. Add to ~/.bashrc or ~/.zshrc:
export ANDROID_HOME=/opt/android-sdk
export PATH="$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH"
Reload: source ~/.bashrc
3. Accept SDK Licenses
sudo /opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses
4. Bootstrap the Gradle Wrapper
The first time only, install system Gradle to generate the wrapper binary:
sudo pacman -S gradle
cd /path/to/Pacer
gradle wrapper --gradle-version 8.7 --distribution-type bin
sudo pacman -Rs gradle # optional: remove system gradle afterwards
5. Build
./gradlew assembleDebug
The debug APK will be at: app/build/outputs/apk/debug/app-debug.apk
6. Install on a Device
Enable USB debugging (Settings > Developer Options > USB Debugging), connect via USB, then:
./gradlew installDebug
# or
adb install app/build/outputs/apk/debug/app-debug.apk
Troubleshooting
ANDROID_HOME not set — Reload your shell profile or open a new terminal.
License for package ... not accepted — Run sudo /opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses.
Unsupported class file major version — Wrong Java version. Confirm java -version shows
17 and JAVA_HOME points to /usr/lib/jvm/java-17-openjdk.
Permission denied on /opt/android-sdk — Run sdkmanager with sudo.
Failed to install build-tools;34.0.0 ... SDK directory is not writable — AGP tried to
auto-download build-tools instead of using the installed version. Ensure buildToolsVersion = "36.1.0"
is set in app/build.gradle.kts.
Development
See AGENTS.md for the developer/agent workflow guide.
See BACKLOG.md for all user stories and acceptance criteria.
./gradlew test # unit tests
./gradlew lint # lint checks
License
Pacer is free software, licensed under the GNU General Public License, version 3 or (at your option) any later version. See LICENSE.
The bundled JetBrains Mono font is licensed under the SIL Open Font License 1.1. See OFL.txt.