It's been a standard feature of XMPP mobile apps for as long as it's been necessary.
In any case, this is the choice of a specific implementation, and not something inherent to XMPP. Your original comment said that integration with Firebase was needed, and I wanted to point out that it is already integrated.
More on the app-killing ROMs can be found at https://dontkillmyapp.com
What you're describing also has been true for iOS for a while. Apps cannot do long-polling and require a push notification server (usually provided by the app maker, e.g: siskin, snikket, chatsecure), and that adds another point of failure.
I've been so full of missing and delayed notifications I just bought an iPhone, which has zero issues with it, with zero configuration.
Still, as I made a few really small android apps in the past, this has been a sticking point for me for years.
Is it possible to write an app that can notify at ANY time? Let's say I want to monitor my self-hosted infrastructure. On an iPhone I get e-mail alerts right away. On Android, some ring exactly at the time I pick up the cursed phone.
I checked for every possible consumer facing configuration option (deep sleep exclusion, background service allowed, etc.) and I found zero reliable options.
Once you leave AOSP-land it can be more tricky, https://dontkillmyapp.com/ has more info if you're interested.
This actually looks very relevant [1]:
> Even disabling the system battery restrictions does not save the app from being killed. Let's find out, if it is a bug or a feature... Here you can read more details
I have Samsung s21; after years of fighting it (3 samsungs) I'm welcome to a bug explanation
- [1] https://dontkillmyapp.com/samsung#:~:text=Even%20disabling%2...
- iPhone rings, Samsung nothing
- I wait few minutes just to be sure and pick up Samsung - immediately after picking it up the notification shows up, with the exact timestamp of the moment I picked it up
That's why I called it a tangent to XMPP
So the iphone version of any xmpp app has to use apples notification service, but the android version of the same app might try to use a direct connection (saving the app developer a lot of server costs), even though on many models of phone it only works when the device is charging for example.
I'll phrase my issue differently: Is there any way to have reliable notification delivery that are time critical? Is actually calling the only 100% reliable option, as the PagerDuty does?
Note that you can only have one push notification reliably per user interaction. So once you have sent a notification, further ones won't be reliably delivered until the user interacts with your app in some way.