When your iPhone receives a WhatsApp/Telegram push notification e.g.
wife:
"buy pizza"
Question1: Is it that the app has to download/receive that itself. That is the banner that pops up on the phone has to download for itself + my Whatsapp/Telegram has to download again for itself?
My friend replied:
Push notifications can have the message as a payload. Your app could extract that and dynamically insert into the conversation without making an additional request - I've done that before. Makes it feel much snappier. The downside is that you're not guaranteed that pushes will arrive in the correct order (or at all).
But I wasn't convinced, from a semantic point of view, push notifications shouldn't really update your app themselves. It would be an abuse if they do...They should only notify your app of an update and then allow you to do the update yourself through you downloading whatever new content that has been made available.
So to see if the top companies and their apps are applying what my friend suggested I did a little experiment with 3 apps (Gmail, WhatsApp, Telegram):
I turned off Wifi, but kept cellular data on, then I also disabled the app's access from using Cellular data.
Then I had someone send me a message/email: Here are my results:
Telegram:: I get an alert (that has the sender + first line). But once I open the app (or tap on the notification), it doesn’t have my new message or anything.
However, if Telegram is allowed to have access to internet…it downloads the messages in the background…that is if I follow this sequence: I’m wifi or on cellular data with no internet restriction --> receive a notification --> turn internet completely off but then go to app: I will see the complete message/body there.
Gmail: I get an alert (that has a preview of subject/sender/body) But once I open the app, it doesn’t have my new message or anything.
If the Gmail app is allowed to have access to internet…then contrary to Telegram: without only until opening the app itself it will download/update emails in Gmail. I’m guessing Gmail doesn’t have content-available
set to 1
but Telegram has it set to 1
WhatsApp: I don’t get anything.
NO interaction happens upon receiving the notification…It only happens if app is downloading itself.
My conclusion is:
NO interaction happens upon receiving the notification…It only happens if app is downloading itself independent from the payload arrival.
Gmail and Telegram are doing a redundant download and basically are't smart enough to what my friend suggested OR that the risk of not receiving an email/message is too much and it’s better to be on the safe side :thinking_face:
Question2: Is that conclusion correct?