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.
5.2 KiB
Backlog for Pacer Android App
Overview
This backlog outlines the development plan for a native Android pacing app, ported from the web version at https://jeena.net/pacer/. The app provides audible beeps at user-set BPM to maintain walking pace, runs offline, and operates in the background during long walks (e.g., 2 hours) without draining battery or interfering with podcasts like AntennaPod. We'll use Test-Driven Development (TDD) where feasible, writing tests before implementation for core logic (e.g., pacing calculations, audio generation).
Key tech: Kotlin, Jetpack Compose, Android SDK (API 24+). Development follows agile user stories with IDs (US-01, etc.), grouped by theme. Each story includes acceptance criteria. Total estimated time: 1-2 weeks.
Themes and User Stories
Theme 1: Project Setup
US-00: As a Agent, I want to know how to work with this specific project, so that even if different agents work with it they follow the same rules. It explains how to use the BACKLOG and how the project is structured.
- Acceptance: AGENTS.md is available for the later agents to come.
US-01: As a developer, I want to set up a new Android project with Kotlin and Jetpack Compose so that I can build the UI and logic efficiently.
- Acceptance: Project created in Android Studio, Compose enabled, manifest configured for audio and services.
US-02: As a developer, I want to configure manifest permissions and dependencies so that the app can run audio in background without issues.
- Acceptance: Permissions for foreground service and battery optimization added; AudioTrack dependency ready.
US-17: As a user, I want to have a README which explains to me how I can build the application, including how to install all dependencies necessary on Arch linux.
- Acceptance: A README.md file exists and explains shortly how to set pu the dependencies and build the .apk
Theme 2: Audio Engine (TDD Priority)
US-03: As a user, I want the app to generate 880 Hz sine wave beeps so that pacing audio matches the web version.
- Acceptance: Unit tests for beep generation; AudioTrack produces correct tone.
US-04: As a user, I want beeps scheduled at BPM intervals with volume control so that pacing is precise and adjustable.
- Acceptance: Tests for interval calculation (e.g., 130 BPM = ~0.46s); volume scales with system volume changes.
US-05: As a user, I want audio to play concurrently with other apps (e.g., AntennaPod) without ducking so that podcasts remain uninterrupted.
- Acceptance: No audio focus requests; beeps play alongside podcast audio without interference.
Theme 3: UI Development
US-06: As a user, I want a retro-styled UI with BPM display, slider, presets, and volume control so that it matches the web app.
- Acceptance: Compose screens render dark theme, green accents, pulse animations when active.
US-07: As a user, I want start/stop toggle and visual feedback (pulse ring, progress bar) so that pacing state is clear.
- Acceptance: Button toggles state; animations sync with beeps in foreground.
Theme 4: Background Service
US-08: As a user, I want the app to run pacing in background with a notification so that it persists during long walks.
- Acceptance: Foreground Service starts on toggle; notification shows current BPM.
US-09: As a user, I want a stop button in the notification so that I can halt pacing without reopening the app.
- Acceptance: Notification includes action button to stop service and audio.
US-10: As a user, I want background operation to be battery-efficient for 2+ hour walks so that the phone doesn't drain quickly.
- Acceptance: HandlerThread used for low-power loop; battery tests pass for extended use.
Theme 5: Persistence and Settings
US-11: As a user, I want BPM and volume settings saved locally so that preferences persist across sessions.
- Acceptance: SharedPreferences stores/reloads values; tests for save/load.
Theme 6: Integration and Testing
US-12: As a user, I want the app to handle screen lock and long durations without killing audio so that walks aren't interrupted.
- Acceptance: Service survives Doze mode; manual tests for 2-hour playback with phone locked.
US-13: As a developer, I want unit tests for core logic (pacing, audio) so that changes are reliable.
- Acceptance: TDD: Tests written before code; coverage for calculations and scheduling.
US-14: As a developer, I want integration tests for background and UI so that full app works end-to-end.
- Acceptance: Tests for service start/stop, concurrent audio with AntennaPod.
Theme 7: Polish and Deployment
US-15: As a user, I want an app icon and splash screen so that it feels native.
- Acceptance: Custom icon added; APK builds successfully.
US-16: As a developer, I want a signed APK for installation so that the app can be deployed.
- Acceptance: Release build generated; offline functionality verified.
Additional Notes
- TDD: Focus on US-03, US-04, US-13 first—write failing tests, then implement.
- Priorities: Complete setup (US-01-02), then audio (US-03-05), UI (US-06-07), service (US-08-10), rest.
- Risks: Battery drain—monitor via profiling; audio latency—test on real devices.
- Definition of Done: All acceptance criteria met, manual testing passed, no lint errors.