46
Why do push notifications work the way they do
(lemmy.blahaj.zone)
A loosely moderated place to ask open-ended questions
Search asklemmy ๐
If your post meets the following criteria, it's welcome here!
Looking for support?
Looking for a community?
~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~
the API that for example Google Firebases provides (most used, as it supports ios and android), is basically "send a notification with following content to this device".
Which is very simple to implement. as it's just fire and forget. But you send the actual data to Google in this case.
There are way to do it differently, for example how signal does it: They send a silent (e.g. invisible) notification to the device, which has no data in it.
That notifiation tells the app to check for new messages.
The app will then fetch messages in the encrypted way as it always does, and displays a notification if needed. No need to send actual data through the notification service (other than the metadata, that notifications should be pulled)