Commit graph

20 commits

Author SHA1 Message Date
7f8a65d76b feat(US-15): add app icon
Adaptive icon (API 26+) with dark background and lime-yellow
pulse ring + center dot matching the UI aesthetic. Legacy PNG
icons generated at all densities (mdpi through xxxhdpi).
2026-03-09 12:22:24 +00:00
2982751533 fix(US-06): brighter secondary text, larger small text, all uppercase 2026-03-09 12:19:09 +00:00
dc1d05b1a7 feat(US-06): match original layout and labels
- Layout order: title → BPM → pulse ring → SLOW/FAST slider
  → presets → VOL slider → START/STOP (full-width, at bottom)
- 'steps / min' replaces 'BPM' under the number
- 'X.X steps/sec' calculated sub-label added
- Slider flanked by SLOW / FAST labels
- Volume shows 'VOL' left and '60%' right
- Default BPM 130, default volume 60% to match original
2026-03-09 12:09:44 +00:00
12f38c19ab feat(US-12, US-13): request battery exemption on launch, verify test coverage
MainActivity now requests battery optimization exemption on first
launch so the foreground service survives Doze mode during long
walks. The REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission was
already declared in the manifest.

Unit test coverage confirmed across all core logic:
BeepGeneratorTest (4), BpmCalculatorTest (6), SettingsRepositoryTest (6).
2026-03-09 12:05:41 +00:00
d296f2bfec feat(US-11): persist BPM and volume with SharedPreferences
SettingsRepository wraps SharedPreferences with typed save/load
for BPM (default 120) and volume (default 1.0). PacerViewModel
loads saved values on init and saves on every change.
2026-03-09 12:05:03 +00:00
c646709438 test(US-11): add failing tests for settings persistence 2026-03-09 12:04:14 +00:00
628129977f fix(US-06): title bigger and yellow, circle always yellow, circle above BPM 2026-03-09 12:02:13 +00:00
de9674a0d0 fix(US-06): increase top and bottom padding 2026-03-09 11:59:25 +00:00
e6fb8506e1 feat(US-06): use JetBrains Mono font and rectangular buttons
Bundle JetBrains Mono Regular and Bold TTF files for a modern
monospace look without needing network access. All buttons now
use RectangleShape to match the sharp-cornered style of the
original web version.
2026-03-09 11:55:02 +00:00
8c9cdefe0c feat(US-06): redesign UI to match original web version
- Black (#0a0a0a) background, off-white (#f0ede8) text,
  lime-yellow (#e8ff47) accent, monospace font throughout
- BPM number flashes to accent on each beat
- Pulse ring with expanding ripple and scaling center dot
- Linear progress bar sweeps across the bottom each interval
- Subtle scanline overlay for retro CRT effect
- START/STOP button inverts to accent when active
2026-03-09 11:42:05 +00:00
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
650d39d598 feat(US-08, US-09, US-10): implement foreground service with notification
PacerService owns AudioEngine and a PARTIAL_WAKE_LOCK so audio
survives screen lock and Doze during long walks. Foreground
notification shows current BPM and a Stop action button.

PacerViewModel becomes AndroidViewModel and communicates with
the service via intents, keeping AudioEngine off the UI process.
Service uses START_NOT_STICKY so it does not restart if killed.
2026-03-09 10:53:40 +00:00
a9bde4ffc7 fix(US-06): match preset buttons to web version
Four presets: 100 (slow), 120 (brisk), 130 (jog), 140 (push),
each showing the BPM and label to match jeena.net/pacer/.
2026-03-09 08:12:39 +00:00
4fa725e4ed fix(US-06): fix preset buttons wrapping on 3-digit BPM values
Set fixed button size and zero content padding so numbers
like 130, 140, 160 fit on a single line.
2026-03-09 08:10:30 +00:00
3f38737a30 feat(US-06, US-07): implement retro UI with pulse animation
Dark-themed Compose screen with:
- Large monospace BPM counter and pace slider (40-200 BPM)
- Six preset buttons (80/100/120/130/140/160 BPM)
- Volume slider with percentage readout
- Circular start/stop button with green pulse ring that
  animates on each beat via a coroutine-driven LaunchedEffect
- PacerViewModel owns AudioEngine lifecycle so audio survives
  configuration changes
2026-03-09 08:07:10 +00:00
def69f1a46 feat(US-04, US-05): implement BpmCalculator and AudioEngine
BpmCalculator provides interval math (60000 / bpm) and volume
clamping (0.0-1.0). AudioEngine drives AudioTrack on a dedicated
HandlerThread, scheduling beeps via postDelayed for battery-
efficient background playback.

Audio focus is intentionally never requested so beeps play
alongside other apps without ducking (US-05).
2026-03-09 07:50:28 +00:00
8e08a53d30 test(US-04): add failing tests for BPM interval calculation and volume clamping 2026-03-09 07:49:59 +00:00
4d72536d78 feat(US-03): generate 880 Hz sine wave with BeepGenerator 2026-03-09 07:46:08 +00:00
5897d2b77b test(US-03): add failing tests for 880 Hz beep generation 2026-03-09 07:46:08 +00:00
a5b3f46eae Set up Android project with Kotlin and Jetpack Compose
Initial project structure with manifest configured for foreground
audio service, AudioTrack-based playback, and background operation.
Includes Gradle wrapper, dependency catalog, placeholder icons,
and build instructions for Arch Linux.
2026-03-09 06:51:42 +00:00