This document serves as a comprehensive briefing for AI agents working on the PracticeTime! project. It combines architectural knowledge, recent changes, and project-specific constraints.
PracticeTime! is an offline-first Android application for musicians to track their practice habits, set goals, and use practice tools (Metronome, Tuner, Recorder).
- Privacy Principle: The app DOES NOT collect PII and DOES NOT transmit data externally. Everything is stored in a local Room database.
- Modernization: Recently upgraded to support Android 15 (API 35) and Java 21.
- Language: Kotlin 1.9.23
- Build System: Gradle 8.7 / AGP 8.4.0
- UI: Fragments (Jetpack Navigation) + Activities.
- Architecture: MVVM (Model-View-ViewModel).
- Persistence: Room Database (SQLite).
- Asynchrony: Kotlin Coroutines & Flow.
- Components: Material Components, MPAndroidChart, AppIntro.
Single-module project (:app).
database/: Entities, DAOs, andPTDatabase.ui/: Features organized by package (activesession, goals, library, statistics, tuner).services/: Foreground services for background timing and audio recording.SessionForegroundService: Manages active practice sessions and metronome.RecorderService: Handles audio recording.
utils/: Common helpers (formatting, etc.).res/: XML layouts, menus, and resources.
- Manual Inset Handling (Android 15): Do not use
fitsSystemWindows="true"alone for root views. Instead, useenableEdgeToEdge()inonCreateand implementViewCompat.setOnApplyWindowInsetsListenerto manually apply system bar padding. - Static Accessors:
PracticeTime(Application class) provides static access to DAOs and common utilities. - Broadcasting:
LocalBroadcastManageris used for internal communication (e.g., recording duration updates).
- Infrastructure: Upgraded AGP (8.4.0), Kotlin (1.9.23), and Room (2.6.1).
- Edge-to-Edge: Full implementation of Android 15 edge-to-edge support across all activities.
- Colors: Expanded category colors from 10 to 20.
- Tuner: Added a chromatic tuner fragment using autocorrelation.
- Loop-Timer: Added a loopable timer with beep notifications (Branch:
add-timer-beep).
- Branch Hygiene:
- Feature work goes into dedicated branches (e.g.,
tuner,add-timer-beep). mastershould only receive stable, approved merges.
- Feature work goes into dedicated branches (e.g.,
- UI Integrity: Always check that bottom navigation and top toolbars respect system insets.
- Strings: All user-facing text must be defined in
strings.xml. - Build Status: Ensure
clean assembleDebugpasses after every major change. - Skill Utilization: Use the
.github/skills/dependency_audit.mdfor checking library versions.
- Simulation: Testing audio (Tuner/Beep) on simulators can be inconsistent. Always prefer real device verification for audio features.
- Transitive Resources:
android.nonTransitiveRClass=falseis set ingradle.propertiesto ensure resource resolution consistency in this legacy codebase.
Refer to Changes-1.2.0.md for a chronological history of recent modernization steps.