Since updating to Android 14, K9 on both my devices (Pixel 7 Pro and a S5E tablet with Lineage 21) im not getting push notifications at all when the app is running in the background.
It seems also pull doesnt work in the background once i turned it on.
If i bring the app to the foreground/load the app then push and pull immediately start working but once its backgrounded again it stops trying.
Android 14 changed how permissions are handled. Apps that are carried over through an update (i.e. from Android 13) are supposed to re-request the (more fine-grained) new permission on first start after the update. Any app that does not do that will not receive the necessary permissions as it will be stuck on the old permissions model.
The workarounds described here basically force K-9 to re-request the permissions, updating them to the Android 14 SotA.
Some examples for re-requesting permissions are available over at Android Developer. However, the K-9 codebase must be adjusted for Android 14.
@tchara Same problem here, thanks, your explanation put me on the right track.
I migrated K9 from Galaxy S7 to S23 (and updated to latest version). No notifications when app was not running.
Solution: export settings, delete app and reinstall, import settings, then grant/check all permissions (energy saving, background data, no app optimization, notifications, app permissions, schedule alarms). Now it works as intended.
Unfortunately, it’s next to impossible to understand how the various permissions and system settings interact with the application, so excluding it from all restrictions may be overkill.