Hacker News new | ask | show | jobs
by tadfisher 1929 days ago
IDLE is especially difficult on recent Android versions without a hosted service piping through FCM. You may be able to get away with a foreground service that displays a permanent notification, but I believe Android 11 or 12 limits even those services so you cannot have a persistent process keeping a socket open.

Power usage would be an interesting problem as well, because I'm not sure if keeping a socket open would pin the radio active.

1 comments

I haven't had any issues on Android 11 with FairEmail using a foreground service. I believe that the changes coming in 12 are able to be worked around though, and at minimum a version distributed outside of the Play Store won't be affected. There's some get-outs to Google's changes at least as they stand right now, but who knows if that will remain the case in subsequent versions.

I haven't seen any suggestion the radio is being pinned active - it seems to still sleep fine, and I believe an incoming messages triggers a downlink page to the phone, which will then wake the radio to deliver the packets.