Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically sync on start the app #7257

Open
3 tasks done
rafaelazvdo opened this issue Oct 13, 2023 · 3 comments
Open
3 tasks done

Automatically sync on start the app #7257

rafaelazvdo opened this issue Oct 13, 2023 · 3 comments
Labels
type: enhancement New features or improvements to existing features.

Comments

@rafaelazvdo
Copy link

rafaelazvdo commented Oct 13, 2023

Checklist

  • I have used the search function to see if someone else has already submitted the same feature request.
  • I will describe the problem with as much detail as possible.
  • This issue only contains a request for one single feature, not multiple (related) features.

App version

6.711

Problem you are trying to solve

I don't like leaving K-9 mail running in the background because it uses a lot of battery, but I open the app frequently to check for new emails, and it's very inconvenient to have to pull down to sync every time I open the app.

Suggested solution

So to solve this, add a selectable automatic synchronization option when opening the application, so those who don't like leaving the application in the background won't have to live with the constant inconvenience of having to pull down to synchronize emails.

Screenshots / Drawings / Technical details

No response

@rafaelazvdo rafaelazvdo added type: enhancement New features or improvements to existing features. unconfirmed Newly reported issues awaiting triage or confirmation labels Oct 13, 2023
@kewisch kewisch removed the unconfirmed Newly reported issues awaiting triage or confirmation label Oct 18, 2024
@kewisch kewisch added this to the Thunderbird 9.0 milestone Oct 18, 2024
@cketti
Copy link
Member

cketti commented Dec 3, 2024

Android manages the process lifetime of an app. When a user leaves all screens of the app, the process is usually kept around so less work needs to be done the next time the user opens the app. On the other hand, the app's process can be stopped at almost any time by Android if another app needs more system resources. When the user navigates back to the app, the process is started again and the previous UI state is restored. All of this is mostly transparent to the user. That's a lot of words to say that Android doesn't want users to think of when an app is "started". The app will be there and ready to use when you need it.

Consequently, I don't think our app should trigger a sync when the process is started. Instead, we could trigger a sync of a folder when that folder is opened in the user interface. But we probably shouldn't do this all the time. Syncing a folder can be slow and expensive. And we don't want to penalize users that quickly switch from one folder to another and back. So when opening a folder the app should only sync if the previous sync was more than X minutes ago. We can experiment what the best value for X is.

@AS98765
Copy link

AS98765 commented Dec 5, 2024

@cketti : Are you talking about POP or IMAP and does the described also apply if “Allow background usage” is deactivated? I thought I could trust the OS (grapheneOS in this case) and the process is really terminated completely after closing the app.

I and others #8214 are only concerned with POP and therefore I do not understand the issues described (slow, expensive, ...).

All that is expected here is a function that desktop apps have been offering for decades. Checking for new emails and downloading these new emails after starting the app.

Or am I still not understanding something?

@cketti
Copy link
Member

cketti commented Dec 5, 2024

"Checking for new messages" is not a concept that is unique to POP. I don't think it makes sense to limit this functionality to a specific account type.

I don't see how this is related to "Allow background usage". When you open the app, it is not in the background and thus the setting doesn't apply.

Android is not a classic desktop operating system. There is no "the user starts the app and it will run until the user closes the app" like there is on desktop OSes. The process of an app might be started and killed multiple times without the user noticing. But from the user's perspective the app was never stopped.
Android also tries its best to move away from the "I have to manually close an app if I no longer want to use it" paradigm we have on desktop OSes. That's why most apps don't have a "quit" button (and the others make things so much more confusing by having one). So on Android it doesn't really make sense to tie functionality to the concept of "the app was started".

Instead of trying to figure out when the user believes the app was started and checking for new messages then, we can rather easily refresh a folder when it is opened. If you use POP there's only one remote folder, the inbox. It should be displayed by default. So opening the app after some inactivity (or after you have manually killed the app) will check for new messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New features or improvements to existing features.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants