News for hackers. Stuff that matters.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by idop on Tuesday November 08, 2022 @07:53AM (#33518477)
Hey there. In Android, is there a requirement or any kind of dependency on Google Play Services? Also, do notifications work when the Ntfy app is in the background? Do I need to disable battery optimizations for it?

Thanks!

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @08:13AM (#33518595)
The Google Play services question is answered here: https://ntfy.sh/docs/faq/#why-is-firebase-used

And yes, you need to disable battery optimization if you don't want to use Firebase. On my phone it uses 1% battery in a full day (17h).

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by jsiepkes on Tuesday November 08, 2022 @08:32AM (#33518738)
Even if you disable battery optimization it's going to depend on your phone if it will actually honor it (and not kill the app). This site: https://dontkillmyapp.com/ shows which phones behave correctly.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by ilyt on Tuesday November 08, 2022 @08:52AM (#33518912)
And if you change the settings that will make your phone behave nicely it often severely impacts battery life ;/
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @10:33AM (#33520070)
We've done some battery work a couple of months ago and since then I've not really had any complaints from the thousands of users, so I think overall it's working.

Every now and then there is some oddball phone that keeps killing connections and such, but it's very very rare. I think we've optimized it to the best of what's possible at the moment.

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by coldacid on Tuesday November 08, 2022 @08:07AM (#33518555)
Given that the ntfy Android app is available through F-Droid, I strongly doubt that Google Play Services is used at all.
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by danuker on Tuesday November 08, 2022 @08:23AM (#33518661)
I suspect the F-Droid version might have delays. There are various issues when avoiding Firebase. There is no way to fulfill all of these:

- avoid Google servers - preserve battery - show timely notifications

https://github.com/deltachat/deltachat-android/issues/82

Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @08:37AM (#33518782)
This is incorrect (at least in my experience). Firebase/FCM is significantly slower in delivering messages than the non-Firebase version (WebSockets or JSON stream, longstanding connection). It was actually mindboggling to me how slow Firebase is in delivering messages (especially when the phone is in doze mode).
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by akvadrako on Tuesday November 08, 2022 @09:56AM (#33519635)
But what kind of battery impact do you get leaving a long-running connection open?
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by binwiederhier on Tuesday November 08, 2022 @10:15AM (#33519867)
Depends on your usage. For me it's around 1% for the entire day: https://ntfy.sh/docs/faq/#how-much-battery-does-the-android-...
Re:Ntfy.sh – Send push notifications to your phone via PUT/POST by daedric7 on Tuesday November 08, 2022 @08:02AM (#33518524)
No, you can download the app from F-droid.

There's no dependency on Google services, although the app can use them if available.