|
|
|
|
|
by seba_dos1
2921 days ago
|
|
Keepalive timeout negotiated by Android on one of my test devices is usually between an hour or two. And as I said - if you're on a particularly crappy network that gets keepalive < 15 minutes, you just fall back to polling. You can only gain battery life, not lose. After all, if your e-mail provider cooperates with Apple, you get your mail fetched by... a constantly open, 24/7 push notification service connection instead of IMAP polling. Which means better battery. Keepalives are also scheduled by the OS - that's one of the most basic power saving strategies. I mean, it has been already implemented in 2009 in Maemo, which wasn't even tiny bit as restrictive about networking stuff as Android and iOS are. |
|
In any case, my inclination here is to believe that Apple doesn't have IMAP Idle because it drains more battery than fetching every 15 or 30 minutes, as I can't think of any other reason why Apple would refuse to implement it (and they've implemented it already in desktop Mail.app, so it's not just laziness). And what's more, I'm inclined to believe Apple has actually tested this out rather than just assuming it to be the case. Apple cares more about power efficiency than any other major software vendor I know of, and email is such a fundamental piece of functionality for the device, if they could actually get better power efficiency by implementing IMAP Idle, they'd have done that years ago.
Now, it's certainly possible that on some networks, keepalive pings could be infrequent enough that IMAP Idle would not use any more power than fetching. But having that be true for some networks doesn't really matter because Apple's not likely to implement a mode that says "use IMAP Idle if it's efficient to do so, otherwise fetch" due to the potential user confusion.
In an ideal world, Apple would standardize some way for mail servers to deliver push notifications to clients (and what's more, do it in a way that allows 3rd-party clients to register to receive these pushes too, not just the built-in Mail.app¹). I don't know why this hasn't happened; maybe nobody cares enough, or maybe Apple can't convince Google to care about having push support for Mail.app² and if they can't convince Google then it's not really worth pursuing as Google accounts for such a huge percentage of the world's email accounts at this point. However, I do know it's possible for mail servers to support Mail.app push notifications, as FastMail rolled out support for it some time ago³.
¹I actually use a 3rd-party client called Spark that gets push email, but to do so, Readdle actually runs a server themselves that logs into my mail account, uses IMAP Idle, and sends the client a push every time new messages come in. This is of course a potential privacy and security violation, though I've chosen to trust Readdle and trust that they abide by their privacy policy (which, among other things, states that they throw away the email data after delivering the push notification, and don't use this data for any other purposes).
²I have to assume this is Google deliberately making the Mail.app experience inferior in order to convince people to use their own Gmail client.
³FastMail had to actually send some engineers to Infinite Loop to talk to Apple engineers directly in order to figure out how to do this integration. I'm really curious what the technical details are here.