Skip to content

Conversation

@alexsparrow
Copy link

No description provided.

alexsparrow and others added 4 commits January 7, 2026 13:02
- Upgrade Flutter dependencies (119 packages)
- Upgrade Android Gradle Plugin 8.4.1 → 8.9.1
- Upgrade Kotlin 2.0.0 → 2.1.0
- Upgrade Gradle 8.8 → 8.11.1
- Replace discontinued soundpool with audioplayers 6.5.1
- Add flutter_foreground_task and flutter_local_notifications
- Fix CardTheme → CardThemeData breaking change
- Fix OSS licenses Package constructor for devDependencies
- Enable core library desugaring for notifications
- Add codebase analysis documentation (AGENTS.md)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit adds full background execution support for the workout timer:

**Background Service:**
- Created WorkoutService helper using flutter_foreground_task
- Service runs as foreground service with mediaPlayback type
- Keeps timer alive when app is minimized or screen is locked

**Notifications:**
- Media-style notification shows current exercise and remaining time
- Displays set/rep progress (e.g., "Set 2/4, Rep 3/5")
- Pause/Resume and Stop action buttons
- Updates every second with current workout state

**Integration:**
- Modified Timetable class to start/stop background service
- Updates notification on each timer tick
- WorkoutPage handles notification action callbacks
- Proper service cleanup on workout completion

**Permissions:**
- Added FOREGROUND_SERVICE, FOREGROUND_SERVICE_MEDIA_PLAYBACK
- Added WAKE_LOCK, POST_NOTIFICATIONS, USE_FULL_SCREEN_INTENT
- Runtime notification permission request for Android 13+

**Android Configuration:**
- Foreground service declared in AndroidManifest.xml
- Core library desugaring enabled for notifications
- Updated to flutter_foreground_task 8.17.0 API

Fixes background timer bug - workouts now continue in background.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@alexsparrow alexsparrow marked this pull request as draft January 15, 2026 04:15
Upgraded dart_pubspec_licenses from 3.0.12 to 3.0.15 to fix PathNotFoundException
in GitHub Actions CI. The fix reads Flutter version from bin/cache/flutter.version.json
instead of the missing version file.

Downgraded flutter_lints from 6.0.0 to 5.0.0 due to dependency conflicts between
dart_pubspec_licenses's pana dependency and flutter_lints's lints requirement.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant