At present, every SailfishOS app that wishes to send push notifications must maintain its own background connection (via WebSocket, MQTT, etc.). If every app maintains its own connection, won’t this drain the battery more as the user installs more apps?
Does Jolla have any plans to implement a centralised push notification system, similar to Firebase (Android) and APNs (Apple), which would allow devices to maintain just a single connection (to the SailfishOS servers) and thus limit the need for each app to maintain its own background connection?
Another solution would be to get in touch with the UnifiedPush team to find out whether integration with SailfishOS would be possible (there is apparently already a Linux integration). This is an open-source, decentralised system that uses a single daemon to manage all push connections, then forwards notifications to applications via D-Bus. This would save resources and simplify development.
Is this really necessary? I mean, you can listen on an open port for messages, and this shouldn’t consume any noticeable resources (there’s no need to do interval polling). For example, I mean the built-in IMAP (keep it always active—or whatever the correct English term is) doesn’t seem to waste any measurable resources, especially when looking at it in the top list.
For push notifications in apps using a connection-based protocol, the only benefit of centralizing them would be that apps wouldn’t need to implement connection and failure management themselves. But then it’s better if at least some self-hosted option (like UnifiedPush) is available, since having a centralized server for Sailfish OS just like Apple and Google have does not sound like a good idea.
For protocols that need regular polling, Sailfish OS already has GitHub - sailfishos/nemo-keepalive · GitHub, which is supposed to save battery power by waking up all apps together at predefined intervals.
It has been discussed at some point in the past -multiple times also i think- but nothing came out of it.
Would be useful i think for messaging apps or wherever needed. If it needs to be run on jolla servers or can be done on nextcloud as an app (self hosted or not) i have no idea.