惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
Jina AI
Jina AI
H
Help Net Security
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
L
LangChain Blog
Recorded Future
Recorded Future
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ
GbyAI
GbyAI
B
Blog RSS Feed
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
M
MIT News - Artificial intelligence
爱范儿
爱范儿
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Y
Y Combinator Blog
B
Blog
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
W
WeLiveSecurity
MongoDB | Blog
MongoDB | Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
The Cloudflare Blog
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
D
DataBreaches.Net
博客园 - 【当耐特】
T
Troy Hunt's Blog
V
Visual Studio Blog
V2EX - 技术
V2EX - 技术
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
The GitHub Blog
The GitHub Blog

IT Notes - ios

IT Notes
IT Notes
Stefano Marinelli · 2023-10-19 · via IT Notes - ios

Since the time I left BlackBerry behind many years ago, I've consistently sought ways to keep my phones connected to my email accounts. I enjoy receiving emails in real-time, and as a result, I've always used tools that allow me to get instant (or near-instant) notifications whenever a message arrives.

Years ago, I even used emails as a notification tool for my servers. If a server became unreachable, an email would alert me, and I'd immediately take corrective action. Nowadays, I use other systems too (like Telegram bots, Pushover, ntfy, etc.), but I still want to know when I receive a new message.

Back when I had my very first Android device (the original Android, the HTC Dream), I was already using IMAP IDLE, so my phone was always connected to my inbox. When I transitioned to the early iPhones, IMAP IDLE wasn't supported, leading me to use an app called PushMail. This app required you to send copies of your emails to it, after which it would push notifications showing the sender and subject. This approach wasn't ideal for privacy, but it was effective.

In the following years, both with iPhones and various email apps on Android, I noticed that my phones consumed more battery in standby mode than the average. Upon investigation, I found out that a significant part of this consumption was tied to the background activities of my email accounts. The energy drain wasn't so much about the software, but more about the network activity triggered by any event in my inbox. For example: an email arrives, the phone downloads it and sends out a notification. I don't check the phone because I'm at my computer, so I open the email there. In real-time, the phone wakes up in the background to mark the email as read. Then, if I move the email to a folder, the phone wakes up again to sync this change.

The same process happens when I draft an email on my computer. Every time the email client saves the intermediate draft, the phone wakes up from sleep to sync the message. Once sent, it wakes up again to remove it from drafts and copy it to the sent folder. This happens all day, for every single interaction.

This made me recall PushMail and made me realize that I don't actually need all this continuous syncing. All I want is to be alerted when an email arrives, knowing who it's from and what it's about.

With this in mind, I developed NotiMail. I chose to support multiple notification providers, though my initial tests were conducted with PushOver, which I found efficient on both iPhone and Android. It works exactly as intended.

As an additional step, I compiled ntfy for FreeBSD. I also generated Firebase keys and recompiled the Android app so I could use my server while leveraging Google's push notifications. This helps save even more battery by utilizing the always-on data connection to Google servers. It's a trade-off in terms of privacy, but I needed to test this "extreme" case.

The results were astonishing. After a few days of use, I observed an average daily battery savings of 15%, and also a variable, yet notable, data savings.

I'm also testing, on a Pixel 7 with GrapheneOS, the impact of using direct push notifications with a continuous connection to my ntfy server. It's probably less battery efficient, but it saves all the data associated with mailbox operations.

This way, whether I have 1, 5, or 50 "connected" email accounts, they don't weigh down my battery (excluding the increased notifications, of course).

NotiMail is available here: https://github.com/draga79/NotiMail