My K9 on android only fetch emails when I open it

Hi guys
This is my first post on this forum. I’ve been using the K9 mail on my androind phone for a long time and I love it.
I recently changed my phone to another android device and I have a problem. I can’t figure out how to make it to check for incoming mail every minute or even 30s. I get some important notifications via email quite often and I just don’t receive them untill I open the client on my phone. This is very annoying.

I would really appreciate any help. My phone is Xiaomi Remi Note 8 Pro. My Android version is 9.

1 Like

You could try joining the beta test to get the latest version of K-9. It uses another method for staying active in the background that is (hopefully) not stopped by the Android system. How do I become a beta tester?

2 Likes

Hi and thank you for your answer ByteHamster.
I would rather not use a beta software. I don’t really understand why is this such an issue. It has always been working fine for me. I will try to use a different software and see if it will make any difference.

The K-9 beta releases are really stable. The only thing that is missing is that they do not yet support IMAP IDLE (eg push mail) - they just support fetching every x minutes.

Alternatively, you can also try to add an exception from “battery optimization” for K-9.

1 Like

I just joined and will test it for a while. I really appreciate your support ByteHamster as it makes my experience a lot better.

2 Likes

If I have a Thunderbird open on my Laptop which is working like 24h a day, would that make any difference? So my emails show up in the thunderbird but not in my K9 app unless I refresh manually?

1 Like

Assuming you are using the IMAP protocol on both devices (and not the deprecated POP3 protocol), new emails will show instantly in Thunderbird. In K-9 beta, they show up after a refresh (manual or automatic, eg. every 15 minutes). When the current beta version of K-9 gets stable, emails will also show instantly. Old emails will show up on both devices.

2 Likes

Just started using K9 beta myself on my F(x)tec Pro1 running Android 9 and I’m also under the impression the periodic check is not quite working. I’ve unable the refresh notification to try get a feeling of what’s going on. It even looks like sync is suspended as soon as I lock my phone. I have quite a lot of folders to sync over IMAP. Like about 50 folders organised in subfolders.

I can indeed confirm periodic polling is not working on v5.729 using IMAP with a Zimbra backend, most certainly nothing to do with the server though.
Poll folders: All
Local folder size: 100 messages
Sync messages from: Any time
Folder poll frequency: Every hour

I’m not getting any email notifications unless I trigger it using pull to refresh. Also when polling is running it is paused as soon as the device is locked. It seems K9 background process is not working as intended.

Some device vendors took battery saving to another level by crippling your phone and killing background tasks of perfectly fine apps - except the “big players” like WhatsApp, which they keep in a list of apps that they don’t kill. Try adding an exception from “battery optimization” for K-9. Most vendors seem to at least respect that list (see https://dontkillmyapp.com/).

1 Like

That phone is from a start-up and is pretty much stock android. I seriously doubt they have any kind of extra feature like that. However I’m actually always running with battery saving enabled and that could be what is getting in the way of K9. I also noticied earlier it started a sync as soon as I plugged it in for charging. Also is K9 taking auto-sync settings into account? Like not doing sync if auto-sync is disabled?

Thanks for the help.

Yeah, I am pretty sure that’s what causes the issue.

I am not completely sure but I do not think so.

1 Like

Actually it is and there is even a setting option allowing user to obey that setting or not which is just fantastic.
Settings > General Settings > Network > Background sync
I really like what you guys are doing :slight_smile:

The default is to only do background sync when auto-sync is enabled, which makes a lot of sense.
However that could have been preventing k9 sync in my case since I’m using an app that only turns on auto-sync for short period of time every so often.

I stand corrected :slight_smile: Thanks for pointing to the source code!

1 Like

It would be great if K9 could get notified as soon as auto-sync is turned on so that it triggers a sync. I wonder if ContentResolver.addStatusChangeListener could be used for that purpose. I’m not sure there is a broadcast for auto-sync.