No description
Find a file
Jeena b2fedcfd4a fix: eliminate audio distortion and sync animation to audio
BeepGenerator: add 5ms attack / 10ms release envelope so the
waveform ramps in/out cleanly instead of cutting off mid-cycle,
which caused the audible click/distortion.

AudioEngine: replace postDelayed scheduling with a continuous
write loop — each iteration writes the full beep followed by
silence in 10ms chunks. This keeps the AudioTrack stream full
and eliminates underrun noise. onBeep callback fires on the
main thread just before each beep is queued.

PacerService: wire onBeep to increment beepTick (Compose state).

PacerScreen: replace the independent BPM timer with beepTick so
the pulse ring animation is driven by the actual audio callback,
eliminating the drift at slow paces.
2026-03-09 11:02:36 +00:00
app fix: eliminate audio distortion and sync animation to audio 2026-03-09 11:02:36 +00:00
gradle feat(US-06, US-07): implement retro UI with pulse animation 2026-03-09 08:07:10 +00:00
.gitignore Set up Android project with Kotlin and Jetpack Compose 2026-03-09 06:51:42 +00:00
AGENTS.md Set up Android project with Kotlin and Jetpack Compose 2026-03-09 06:51:42 +00:00
BACKLOG.md Set up Android project with Kotlin and Jetpack Compose 2026-03-09 06:51:42 +00:00
build.gradle.kts Set up Android project with Kotlin and Jetpack Compose 2026-03-09 06:51:42 +00:00
gradle.properties Set up Android project with Kotlin and Jetpack Compose 2026-03-09 06:51:42 +00:00
gradlew Set up Android project with Kotlin and Jetpack Compose 2026-03-09 06:51:42 +00:00
gradlew.bat Set up Android project with Kotlin and Jetpack Compose 2026-03-09 06:51:42 +00:00
README.md Set up Android project with Kotlin and Jetpack Compose 2026-03-09 06:51:42 +00:00
settings.gradle.kts Set up Android project with Kotlin and Jetpack Compose 2026-03-09 06:51:42 +00:00

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