-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Here's a comprehensive documentation for your Meditation Tracker app, structured as a GitHub Wiki. You can add screenshots in the specified sections:
This app helps users track their meditation progress with features like:
- Daily timer with background functionality
- Manual entry of meditation time
- Goal setting and progress tracking
- Weekly/Monthly/Yearly summaries with charts
- Data export/import functionality
- Dark mode support
The app follows a modular architecture with separate activities for different features. Core components include:
- BaseActivity: Handles navigation drawer and theme management
- Data persistence using SQLite databases
- MVVM pattern for data handling
- activity_main.xml
- Displays current date, daily total, timer, and manual entry
- Timer: Uses TimerService for background tracking
- Manual Entry: Collects hours/minutes/seconds input
- Goal Card: Shows progress for active goals
Screenshots: Add screenshots of the main interface here
- Timer logic: MainActivity.java (startTimer/stopTimer methods)
- Database updates: MeditationLogDatabaseHelper (updateDailyLog)
- activity_goals.xml + goal_item.xml (RecyclerView items)
- Create goals with target hours and dates
- Progress tracking with percentage display
- Delete functionality
Screenshots: Add goal creation and list views here
- Data handling: GoalsDatabaseHelper (CRUD operations)
- Adapter: GoalsAdapter (RecyclerView population)
- Date picker: GoalsActivity.java (showDatePickerDialog)
Weekly (WeeklyActivity)
- Layout: activity_weekly.xml
- Features:
- Bar chart showing weekly progress
- Navigation between weeks
Screenshots: Add weekly chart view here- Code Reference:
- Data retrieval: MeditationLogDatabaseHelper (getWeeklyMeditationData)
- Chart configuration: WeeklyActivity.java (updateWeeklySummary)
Monthly (MonthlyActivity)
- Layout:
- activity_monthly.xml
- Features:
- Monthly chart divided into weeks
- Total hours display
- Screenshots: Add monthly chart view here
- Code Reference:
- Data retrieval: MeditationLogDatabaseHelper (getMonthlyMeditationData)
- Chart configuration: MonthlyActivity.java (updateMonthlySummary)
Yearly (YearlyActivity)
- Layout:
- activity_yearly.xml
- Features:
- Yearly chart with monthly data
- Navigation between years
Screenshots: Add yearly chart view here- Code Reference:
- Data retrieval: MeditationLogDatabaseHelper (getYearlyMeditationData)
- Chart configuration: YearlyActivity.java (updateYearlySummary)
- Export/Import:
- JSON and SQLite database export
- File selection for import
- Code Reference:
- Export: BaseActivity.java (exportData method)
- Import: BaseActivity.java (importData method)
Screenshots: Add export/import UI here
- Navigation Drawer:
- Implemented in BaseActivity
- Menu items link to different activities
- Theming:
- Light/dark/auto theme options
- Theme buttons in menu drawer
- Code Reference:
- Theme handling: BaseActivity.java (applyTheme/setThemeAndSave)
- Drawer setup: BaseActivity.java (setupDrawer)
- Layout:
- activity_releasenotes.xml + release_items.xml + release_notes.txt (RecyclerView)
- Functionality:
- Displays version history from release_notes.txt
- Markdown rendering with table support
- Screenshots: Add release notes view here
- Code Reference:
- Data loading: ReleaseNotesActivity.java (readReleaseNotes)
- Markdown processing: ReleaseNotesAdapter (Markwon integration)
- Layout:
- activity_menu_drawer.xml + activity_base.xml
- Functionality:
- Access other screens
- Export button
- Import button
- Screenshots
- Code Reference:
- Data loading: BaseActivity.java
Meditation Logs Database (meditation_logs.db)
- Table: logs
- Columns: session_id, date, total_seconds
- Usage:
- Stores daily meditation time
- Used for all summary calculations
Goals Database (goals.db)
- Table: goals
- Columns: _id, description, target_hours, progress_hours, start_date, end_date
- Usage:
- Stores user-defined goals
- Tracks progress and dates
- MPAndroidChart: For bar charts in summaries
- Markwon: For rendering release notes in Markdown
- Material Components: For UI elements
- Activities: Each feature has its own activity (e.g., MainActivity, GoalsActivity)
- Adapters: RecyclerView adapters for lists (e.g., GoalsAdapter)
- Database Helpers: Separate classes for data handling (GoalsDatabaseHelper, MeditationLogDatabaseHelper)
- Utilities: Theme management in BaseActivity
- Unit Tests: Add test cases for database operations
- UI Tests: Verify chart rendering and navigation
- Edge Cases: Handle date boundaries in summary calculations
Screenshot Placement Guide: Main screen: docs/screenshots/main_screen.png Goal creation: docs/screenshots/goal_creation.png Weekly summary: docs/screenshots/weekly_summary.png Monthly summary: docs/screenshots/monthly_summary.png Yearly summary: docs/screenshots/yearly_summary.png Release notes: docs/screenshots/release_notes.png