Notifications for Proton mail. No google play services needed
I should specify…. This does NOT fix the Proton Mail app itself. This post let’s you run Proton Bridge on your android device which then allows you to use a 3rd party email client, which then has working notifications.
This is a post for people who want Proton Bridge running on their android device and for people who want notifications without having google play services installed (GRAPHENEOS for example).
It uses about 1% of battery for me from a full charge.
This setup only takes about 2 minutes or so to do, nice and easy.
It installs the bridge and sets a script to automatically start the bridge when your device boots.
IMPORTANT
You can remove Termux from your recent apps list and the bridge stays running… BUT, see the below note…
If you force close Termux or it crashes, your email client will not know and won’t give any errors. If you try to send an email, you’ll get an error notification from your email client… If this happens, run the following command to restart the bridge…
proton-bridge --cli
The only solution that I know of for if these 2 events occur is to have an automated task to check and restart the service if the bridge stops……. More info at the bottom of the post
===============================
- Install Termux and Termux:Boot
- Give them unrestricted battery usage
- Give Termux network usage
- Open Termux:Boot once, then close it (this initialises the app)
TERMUX COMMANDS…
- pkg install pass proton-bridge -y
- proton-bridge --cli
- login
- info (IMAP/SMTP info for your email client)
This session will have the bridge permanently running, so you need to start a 2nd Termux session for the rest of the commands…
- cd ~/.termux
- mkdir boot
- cd boot
- pkg install vim -y
- vi proton.bridge
- i
Paste these 3 lines…
- !/data/data/com.termux/files/usr/bin/sh
- termux-wake-lock
- proton-bridge --cli
Press the escape button
- :wq (on the keyboard, type ‘:wq’)
===============================
I’ve been playing around with Macrodroid too…
Because I’m very particular, I’m trying to make a macro using the Termux:Tasker app which is a plugin for Macrodroid/Tasker.
I want to make an automated task so if the bridge ever shuts down, the macro runs to restart it.
By using this automated task as well as Termux:Boot, you are guaranteed to have the bridge start itself and run under all circumstances (booting your phone, Termux crash, force stopping Termux etc)
This achieves the goal of having Proton Mail notifications on any 3rd party email client at all times… The way Proton Mail app itself functions when play services is installed
==================================
Open Termux
COMMANDS
- mkdir ~/.termux/workdir
- mkdir ~/.termux/tasker
- cp ~/.termux/boot/proton.bridge ~/.termux/tasker/
In Macrodroid or Tasker, create a macro/task using the Termux:Tasker plugin
In the config…
Executable: proton.bridge
Working directory path:
- /data/data/com.termux/files/home/.termux/workdir
Uncheck “execute in a terminal session”
Save the config
=================================
I haven’t worked out a trigger for the macro/task yet to detect when the bridge shuts down, so for now, I have the macro/task set to run at an interval of every 5 minutes…
It sounds extreme but if you run the command (proton-bridge --cli) and the bridge is already running, it simply fails and tells you so…
So running this every 5 minutes doesn’t use internet and takes about 3ms (exaggeration), it basically won’t use any battery