Keep the timer notification in the background; fix review findings #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "review-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Requested by Berkay · project thread
Timer notification disappears in the background
Root cause:
ForegroundTaskOptions(stopWithTask: true). In flutter_foreground_task 11.0.3 this option also installsTrackVisibilityUtils, which callsstopForegroundService()inonActivityPausedonce no activity is resumed, i.e. as soon as the app goes to the background. After that everyupdateServicereturnedServiceRequestFailure(ServiceNotStartedException), which was ignored, so the notification never came back (and the process lost its foreground status and wake lock).Fix: leave
stopWithTaskunset (the manifest'sandroid:stopWithTask="true"still stops the service when the app is swiped from recents),allowAutoRestart: false, read the plugin's result values, and try to start the service again (at most every 10 s) when an update finds it gone.Review findings fixed
Paused · 0:55 · Round 1right away (it was stuck on the last time).lastDoneAtof the stored copy.setLanguage(en-US, en-GB, en), 5 s timeout, falls back to the knock cue, warns once on the session screen; retried on next start.just_audioplay()errors caught.Tests
flutter analyzeclean,flutter test90/90 (6 new: pause notification + screen, checkpoints, edited workout, corrupt records, skip-round countdown, random PREV). Not tested on a device; no APK built.🤖 Generated with Claude Code
https://claude.ai/code/session_015s4aKptMeqctAXfhFSKWNs