On Android phones/tablets without Google Mobile Services (LineageOS without OpenGAPPS, for example) it would be great to have an alternative to Googles push notifications. Because on modern android versions, an app service that is permanently running in background get killed by the power saving function, it would be necessary to have a permanent notification like riot.im or Deltachat has. On Android 8, it is possible to hide this notification and don't hide other notifications (for new messages and calls) if there are different notification channels for the app.
The option to use a permanent notification could be deactivated by default and manually activated if requested by the user.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
In the issue don't mean to implement another way for accessing push notifications from a server but running a DHT note permanently using a permanent notification. I thing that was not clear enough, sorry.
In my opinion, at least the point "Can we avoid any central points?" would solved, because currently, to activate push notifications, you have to relay on a DHT proxy server which is kind of a central point (like in the variant discussed on https://github.com/savoirfairelinux/opendht/issues/241, too). This would also work without any need of E-Mail.
AFAIK there would be no big delay and it would be an easy solution for the user, but battery consumption would be greater than on simple push notification with DHT running on a server and not on your own device.
The question "Whats the limit? There is already plenty issues with push notifications, like constructors politics [...]" could be answered by most users using such smartphones have GCM or FCM support and could use the solution with a DHT proxy, if necessary, even if that is less decentralised.
Continuously running a full dht node on mobiles is likely to to consume too much data and battery. And the dynamically changing topology might also impair the p2p network stability.
But letting ring maintain only one permanent connection to a dht proxy should work well.
And ring-android would only have to show that permanent notification when the screen is turned off, so even users on older OS versions would actually never have to see it.
"The German Prototype Fund is supporting Briar in developing a feature that will allow users to send each other messages even if they are not online at the same time. This will increase users' reachability and further improve battery life."
What the original reporter suggested makes a lot of sense when connected to a dht proxy, and it should be trivial to emit a permanent notification to let us test it.
Please find the time to emit a permanent notification (from the dht process so it continues to run in the background during suspend) when listening to a dht proxy. :-)
Maintaining a permanent DHT Proxy connection in background (stand-by doze)
What is the easiest solution for end users? What they will need on their device?
Ring may automatically use a dht proxy and keep the connection running (permanent notification) if on battery. (See deltachat as reference above.) Nothing to do for the user.
Battery consumption?
Should be low (deltachat 1%), if the proxy protocol transmits nothing more than 14 minute keep-alives (Consumption can only be lowered further if multiple apps can use a shared service to listen for updates over a single connections https://gitlab.com/foss-push/planning/wikis/home )
Using "HTTP-SSE" as tutanota seems to require additional http client logic and a http server infrastrucure.
On the other hand ring (opendht) could maintain its connection to a dht proxy node permanently, and possibly become a good, even default (p2p scalable), push protocol alternative for https://gitlab.com/foss-push/planning/wikis/home that doesn't require to run own http or imap push servers.
A basic initial fosspush-android service could start with an apk installing opendht and the code from deltachat that contains the tricks to keep it running in the background permanently.
Later optionally implementing code for an android content-provider that could also support push protocols from other packages and lets other apps beside Ring subscribe to push messages.
Most people these days run messaging apps on mobile devices, and right now the only sustainable connection method on a mobile device is via a DHT proxy + push notification, thus a large part of the Ring network is actually centralized, which is going against the goal of the project.
In my opinion showing a persistent foreground notification is in fact a more reasonable way. Users would be confident that they are aware of what apps are running in the background. Think about the "system tray icons" in the traditional Windows desktop.
There are in fact lots of powerful devices running a mobile OS, e.g. iPad and Android TV. Users don't really bother the consumption of power or data, and more DHT nodes definitely help with the health of the network.
The client can be designed to run a DHT node while on battery + Wi-Fi and switch back to using a DHT node when one of the conditions changes.
I am a bit confused by the thread because people have been discussing the push notification matter instead of what the ticket originally describes.
re-read the topic and the comment of @seamlik. This allow the DHT to work without push, but this doesn't solve the battery/data consumption problem solved by push notifications.
The only thing to remove proprietary push services is to use a FOSS push alternative.
A permanent notification enables the app to run in the background at all times, thus making it possible to maintain a DHT connection. This issue is about running a DHT node directly instead of using push notifications.
Expect higher battery and data usage if this mode is on. The patch is not to resolve that matter either.
The latest update from Play Store came with the patch, looks working, my battery has been drained quickly!
But I noticed the option to turn push notifications off disappeared. Is it merged with the permanent notification option? In other words, does turning off permanent notification implies using push notifications?
Shall we add an option to automatically manage the proxy + background running matter? We can let the app turn off the proxy and stays running in the background when the device is being charged + using Wi-Fi. Or we should probably open another ticket for this.
Normal users don't usually know these technical details, and probably shouldn't need to care either.
A side note: the iOS client by default sets the push notification disabled and all my friends using an iPhone just thought the app was useless because it never worked...
Sébastien Blinadded 1 deleted label and removed 1 deleted label