-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Comments
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. |
@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? |
"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. 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. |
Checklist
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
The text was updated successfully, but these errors were encountered: