Skip to content

Run in background#34

Open
JoshGlue wants to merge 1 commit into
klimeryk:masterfrom
JoshGlue:master
Open

Run in background#34
JoshGlue wants to merge 1 commit into
klimeryk:masterfrom
JoshGlue:master

Conversation

@JoshGlue

@JoshGlue JoshGlue commented Mar 4, 2025

Copy link
Copy Markdown

@klimeryk Thanks for this app! I wanted to use it, but I didn’t want to keep the app open all the time. I also wanted to receive notifications, see my watch face, etc. So, I modified the application to spawn a temporary background process that notifies the user when a Pomodoro session or break is over.

I also noticed many reviews mentioning battery drain. I haven’t used the app long enough to observe this myself, but perhaps this change helps mitigate the issue since the app is only active when the timer runs out.

Some limitations:
Garmin requires a minimum of 5 minutes for a temporary background process. As a result, the shortest possible Pomodoro or break duration is now 5 minutes instead of 1. (But who would want anything shorter than 5 minutes anyway?)
Resources cannot be accessed in the background, so the notification text is now hardcoded in the codebase and always in English. (Do you happen to know a way to access resources in the background?)

@klimeryk

klimeryk commented Apr 8, 2025

Copy link
Copy Markdown
Owner

Thanks for submitting the PR, @JoshGlue! Appreciate it, truly.
I definitely agree that the app could benefit from running in the background (and I really like your approach, from a quick glance!). Or other newer features like glances, widgets, etc. The problem is that I'm trying to keep it compatible all the way to CIQ 1.2.0, or at least 1.4.0, with as many legacy devices as possible.

So at the very least, this background mode would have to be optional and/or a fallback for devices that don't support it needs to be provided. Which is why I never got around to doing it 😓 It's not impossible, just never got around to trying it out. I can try to add some guards since your PR is a great starting point, or if you feel like it I can leave it to you 🙇

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.

2 participants