Can't you have the same mechanism to avoid battery drain on the native app with our own server? I mean server pushing notifications? Why should it drain more battery than using the 'external' server with push?
As far as I've understood, the only way to reliably push to Android devices in sleep is via Google's Firebase Cloud Messaging service. Google controls access to this service and only the main ntfy.sh
host uses this (can use this?).
EDIT: Oh wow, the docs for this tool are really good! Apparently, you can also add FCM to your own instance.
This is cool! Do PWA push notifications bypass the need for the centralised Apple/Android services?
No. Web Push is a spec implemented by all browsers that allows servers to push notifications to the browser via their own push service. Each browser ships with its own hardcoded web push endpoints. Chrome uses FCM under the hood, Firefox uses some Mozilla servers, and so on.
However, all messages are encrypted with a key that the push servers do not know. Only your server and your browser do.
Big PWA fan here but I wasn't aware that safari on ios is now supporting push notification (not an apple user). Do you have any link about it?
There are instructions on how to install the PWA on Safari/iOS here: https://docs.ntfy.sh/subscribe/pwa/#safari-on-ios
Thanks for the reply. I was hoping this might be a way to allow servers without an internet connection to still deliver push notifications to clients.
Sadly no. I must admit I was incredibly disappointed by the webpush spec. ntfy could easily be a push service, but the spec does not allow that. You cannot override your own server.
dammit. thanks for the info!
Hmm. It doesn't seem to work on iOS 15.7.7 with SE first gen. After adding app to desktop it behaves just as standard browser window with address bar visible constantly on the screen etc. Other app that uses PWA works well ex. miniflux, snappymail. I know that push notifications won't work below iOS 16 however there are some tweaks with changing safari variables but doesn't work either.
It only works with 16.4 afaik.
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!