4 ms·
Pardon for a tangent! I've been so full of missing and delayed notifications I just bought an iPhone, which has zero issues with it, with zero configuration.
by eurekin 3y ago
Pardon for a tangent!
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.
- Dibby053 3y agoNtfy.sh seems to work perfectly on stock Android without firebase/GSF. I do have "unrestricted" enabled in app settings but it doesn't seem to impact battery life in a noticeable way. I never missed any notifications. Once you leave AOSP-land it can be more tricky, https://dontkillmyapp.com/ https://dontkillmyapp.com/ has more info if you're interested.
- eurekin 3y agoThank you! 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%20the%20system%20battery%20restrictions%20does%20not%20save%20the%20app%20from%20being%20killed.%20Let%27s%20find%20out%2C%20if%20it%20is%20a%20bug%20or%20a%20feature...%20Here%20you%20can%20read%20more%20details https://dontkillmyapp.com/samsung#:~:text=Even%20disabling%2...
- londons_explore 3y agoiphone doesn't solve it... XMPP apps on iphone just use a server to be your agent and send push notifications instead.
- eurekin 3y agoIt solved "delayed notifications" for me, for certain: I still have original Samsung next to iPhone and it's clear as day: - 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
- londons_explore 3y agoI think this is because iphone has never allowed background apps to hold open persistent connections, yet android does but with device and power-state specific limitations. 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.
- lightedman 3y agoMost android devices do that - sleep-state an application and it won't tell you anything until you actively pick up the device and use it. Been like that since I had my Kyocera DuraForce Pro on Android 6 or 7.
- eurekin 3y agoYes, and there is an option to opt-out of that list. I did enable that. 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?
- londons_explore 3y agoPush notifications via play services are the only reliable way. They work even with battery saver on (but not extreme battery saver, unless the app is excluded). 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.