46

So I always here about on how Google Android and IOS those companies can see all your notifications. This is because to show a notification it calls an API.

Is there any technical reason that it has to send your notification data to Google and Apple or is it just to get more data on you?

you are viewing a single comment's thread
view the rest of the comments
[-] marsara9@lemmy.world 8 points 1 month ago* (last edited 1 month ago)

More technically there's two ways to move data between two separate services. You can either pull or push the data.

Assume for both scenarios that the client is your phone and the server is some machine in the cloud.

With pulls the client calls an API and the server returns a response. Generally the www works this way. You ask a server for a wab page and you effectively pull the source down to your browser.

Pushes work the opposite, in that a server has data for the client and needs to push or otherwise give it to you. Pulls are relatively strait forward because every server has a well known name (the domain name and url). But your phone's IP address changes constantly. So how does a server know how to contact your device? There's generally two ways:

  1. Your device can poll (make repeated pulls to a server checking for new data)
  2. Or you can register some identifier and your IP address with some central server every time it changes. And then the server can essentially call a URL on your device directly. This is essentially what Google and Apple are doing as it doesn't waste CPU resources and your battery.

You could in theory implement either of these yourself but because of the way the OSes work on both Android and iOS there's no guarantee that you can keep a process running in the background forever. As the OS can kill your process if the OS needs more free ram, etc ... The built in notification APIs are exempt from this because they are part of the OS.

this post was submitted on 04 Jun 2025
46 points (97.9% liked)

Asklemmy

49574 readers
239 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 6 years ago
MODERATORS