Push Notifications: how to do it? Amethyst doesn't have a server, so there nothing to push from.

Is it possible to sign up from push notifications from independent relays? Is it safe? 🤔

FYI: a push notification is simply an alert to the app that some new content is available. The push doesn't actually carry the content itself. Upon receiving, Android wakes the app up and the app needs to ping relays to download the new content and display as a notification.

Reply to this note

Please Login to reply.

Discussion

There is a library out there than can help you accomplish push notifications without requiring Google Play Services installed. This is important for GrapheneOS users.

I am way more concerned with who controls the server that sends these push notifications than the infrastructure to transmit the push.

Music to my ears. Privacy first

Thanks for the explanation.

What about nextcloud push or letting users use gotify servers?

NIP?

Would clients select which relays are allowed to send push notifications for certain note kinds and/or events?

Inglese

If it's not safe to have push notifications without Google services or if you can't have them at all, it doesn't matter. Notifications, in my opinion, are a convenient habit. Of which you can do without, being just a simple habit

It's crucial for private messages and timely replies.

Oh, ok. 👍

zaps are the push notification

That's the perfect scenario for private relays like @Umbrel ones

It almost feels like the push server needs to be separate from the relay... If the relays also had to keep track of followed npubs and send notifications to every client, things could get quite heavy and complicated for relay runners, no?

Push notification servers almost seem like another type of client, not a relay. Like individuals could run their own notification server (maybe a desktop app) and then mobile clients could connect and take notifications from there

Unified push is the way. Check out ntfy.sh

You could run a simple server

yourself and make it a premium feature?

Not a big fan of client apps running servers or relays. The more we run, the more centralizing the experience is.

I already run the post view count server and hate it so much...

How does the post view count work? I

UI Shows an image from counter.amethyst.social with a `/HEX_ID.svg`

sorry for the confusion, was trying to repost a different event, but ui scrolled out from under me

Should fix this before adding notifs ;)

Personally the view counter is meh. Not sure if that's a cintrarian opinion. I'd say nix it especially if it bugs you.

Not sure if it's as easy as just removing.

But as a user my exp wouldn't suffer without the view count thing

Could use a WorkManager background service, or CoroutineWorker if using Kotlin Coroutines

WorkManagers are long lived and usually not cancelled by android os unless they're real battery hogs. Could use one to periodically query for user notifications from relays

Maybe something self-hosted or relay operator subscription?

Checkout https://ntfy.sh/

Was going to suggest ntfy since I already use it personally and for unified push. When I have a minute I'll probably write a subscriber service that sends 'nostr:abc123...' links via ntfy for notifications.

The first thing I do with every app I install on my phone is turn off push notifications. Especially for social apps. I only want to engage when I'm ready.

That's your choice. Other might want to immediately react to private messages from family members.

That's a good point.

I like the idea that you could enable push notifications from certain relays.

Amethyst could run background-service that searches for new content and notifies when new stuff arrives 🧐

Vitor, do take a look at unifiedpush (https://unifiedpush.org/). It's a very developer friendly, cross platform framework that lets you do decentralized push notifications outside of the grasp of tech titans. It has zero dependence on FCM or Apple services. It works amazingly well on Android with ntfy (https://github.com/binwiederhier/ntfy-android) which can be either hosted or self-hosted.

Here's a simple android unifiedpush integration example in their github: https://github.com/UnifiedPush/android-example

Não vejo necessidade de notificação push pra rede social.