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.
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
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).
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.