Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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!



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).


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.


And if you change the settings that will make your phone behave nicely it often severely impacts battery life ;/


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.


Given that the ntfy Android app is available through F-Droid, I strongly doubt that Google Play Services is used at all.


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


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).


But what kind of battery impact do you get leaving a long-running connection open?


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-...


No, you can download the app from F-droid.

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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: