A while back, people here kindly explained how typical commercial Android apps get push notifications. Quick version: notifiications are sent through Firebase Cloud Messaging (FCM), which communicates with Google Message Services (GMS), an always-on Android client app preinstalled on most Android phones. There’s a FOSS alternative to GMS called MicroG but it’s still an FCM client, and FCM is an evil Google service that client apps that use it have to enroll with even if you escape GMS on the client side.

Right now I’m interested in sending myself push notifications from a self-hosted service that I run on a VPS. Of course I don’t want to deal with FCM. I also prefer to not have to develop an Android app as opposed to running something like an XMPP client.

It looks like there are some alternatives like Iris and Unified Push (unifiedpush.org). It looks to me that UP becoming the preferred solution, is that right? UP has its own always-on client that can receive messages from a UP server that you can self-host. This sounds ok to me in principle.

My main question is whether UP is somehow worse than GMS, in terms of being a background app that keeps a network connection open. Is GMS anything special in that regard, besides being preinstalled by Google? Would GMS use less battery power or anything like that?

I may also have to look into how XMPP works, if my server program is going to send messages through it. I actually have an unrelated reason to be interested in XMPP. But does that approach sound reasonable? Are there XMPP clients that are non-bloaty, don’t eat battery energy in the background, etc.? I’d like a loud audio alert if I get one of these notifications from my server. Can I usually easily set up XMPP clients to allow that only from my own service, while not making sounds for anything else? I’m luddite enough that I still use IRC for online chat, but maybe I have to catch up with the 20th 21st century about this. Is there a good community to discuss XMPP development and self-hosting? I.e. I’d want to self-host the XMPP server and use it to send messages to my phone from my own (also self-hosted) server app.

The simplest alternative I can think of is for my server program to just sometimes send me SMS messages through Twilio or similar. The alerts will be infrequent enough that I don’t mind going this route. Does that sound easier? It’s less in the self-hosted spirit but it gets rid of a lot of software on both the server and the phone, I guess.

Thanks!