Live data from Hacker News

Did you know you can put a whole game inside of a push notification

twitter.com

71–80 of 90 posts

Re: Did you know you can put a whole game inside of a push notification

#71
post #59

I'd prefer Apple to fix horrible notifications on iOS. Since they broke VoIP background notifications, developers have no way to reliably perform silent delivery of information to device. For example in a chat app that syncs with desktop you can deliver incoming messages, showing them as alerts, but you can't deliver your own, because you MUST show alert on every push notification. Another use case is removing notifi…

We've also run an app with 1 million+ users for a few years, and I can confirm that notifications are a wreck on both platforms, but IMO even more so on Android/FCM. In fact most of our calculations show that we have never gone past 85% delivery of high-pri Android notifications to valid FCM tokens. By high-pri here we mean direct chat messages in an active 1-on-1 chat conversation. This has caused many users to aban…

There are some well-intended reasons for this, but unfortunately, they've resulted in many problems that don't have simple solutions.

To help increase battery life, both Apple and Google provide a standard notification backend that keeps a single background connection open for every device and routes notifications to the device. Google and Apple require the use of their systems for push notifications (APNS and FCM).

BUT... Google's services are blocked in mainland China. So, developers in that region have resorted to building their own push notification systems. No single standard has emerged, so apps may use several third-party FCM alternatives or entirely develop their own.

Inevitably if you live in China and you have hundreds of apps on your device, with each one waning to keep its own background connection open, your battery won't last more than a few hours.

As a result, OEMs in China modify the operating system on devices they sell to prevent apps from having background connections open. Users are expected to manually go into their settings and allow specific applications to keep connections open. Sometimes OEMs will have pre-set list of popular apps that are automatically included.

If one of these devices is sold outside of China, it sees FCM in the same way as any other background connection and kills it.

Now here's where it gets crazy:

1. Many devices sold on eBay and in other channels are devices that were intended to only be sold in China. The seller modifies the operating system to add Google's services to it and changes the default language to English. These devices tend to be particularly problematic because sellers intentionally mislabel them as international devices, even though they are still running a modified version of Android intended only for phones sold in China.

2. Many OEMs have chosen to keep some of their background connection killing logic even in devices sold outside of China. It's hard to say precisely why. Maybe they are competing for higher battery life, or perhaps they don't recognize the problems that it causes. This logic usually does some combination of either killing an app such that it can't wake up to receive a notification, or it interferes with the FCM connection to prevent any app from receiving notifications.

3. Building on #2 -- Many popular devices (e.g. modern Samsung phones) will ask users during the onboarding process if they want to "put apps to sleep after three days of not being used", and the option is "ON" by default. Users often don't realize that this setting will break apps that set background timers (e.g.: alarm apps) or that need to receive notifications.

4. The modifications made by these OEMs are often buggy. For example, user settings get reset after updates. Or the operating system seemingly randomly kills apps in such a way that prevents them from getting notifications.

5. Since OEMs often allow some popular apps to get around these restrictions, it creates an unfair situation between different companies. For example, Facebook might always work fine, but an up-and-coming social network will run into reliability issues.

6. In some cases, devices will appear to receive a push notification but will not display it to the end-user. This can be related to either power management preferences or OEM-specific "do not disturb" preferences.

This is a great website with more information on this issue: https://dontkillmyapp.com/

(Disclosure: I'm one of the founders of OneSignal. We've been tracking and mitigating this problem by implementing "Delivery Confirmation", a feature that permits apps to send a webhook whenever the app displays notification so that developers can see the end-to-end delivery of each message and either retry their messages or use a different method of contacting the user)

Re: Did you know you can put a whole game inside of a push notification

#72
Super neat use of iOS Content-Extensions! I didn't realize these were so well supported on Big Sur.

For anyone looking to build something similar themselves, here's an example project on using a Content Extension to create an interactive notification: https://documentation.onesignal.com/docs/ios-image-carousel-...

(Direct github link: https://github.com/jfishman1/OSNotificationContentExtension)

Re: Did you know you can put a whole game inside of a push notification

#74
post #71
post #59

Earlier quoted context omitted.

We've also run an app with 1 million+ users for a few years, and I can confirm that notifications are a wreck on both platforms, but IMO even more so on Android/FCM. In fact most of our calculations show that we have never gone past 85% delivery of high-pri Android notifications to valid FCM tokens. By high-pri here we mean direct chat messages in an active 1-on-1 chat conversation. This has caused many users to aban…

There are some well-intended reasons for this, but unfortunately, they've resulted in many problems that don't have simple solutions. To help increase battery life, both Apple and Google provide a standard notification backend that keeps a single background connection open for every device and routes notifications to the device. Google and Apple require the use of their systems for push notifications (APNS and FCM).…

Thank you for this! It seems like many apps on the growth path go through this same investigation, since we arrived at many of the same conclusions you did (down to calling our own webhooks from within onMessageReceived to retry, or figure out which kinds of devices had the most problems). We spent over a year on this before we hit what I think is our maximum achievable delivery rate of around 85% (short of repeatedly hassling users to go deep into their settings or forcing them to give us an e-mail/phone number to use as backup).

Our app isn't even enabled in China but the points you make in 1 and 2 mean that plenty of devices in South America, Africa, Asia (and even some in North America and Europe) run into these problems.

I think (5) above is a serious unfairness problem since many conversations turn to "I didn't get your notification, let's talk on Whatsapp instead" which affects retention. Now 10-15% failed notification deliveries might not seem like much but if you're talking to 4-5 people either individually or in a group chat then one of them is bound to pull you into a more "reliable" app.

Incidentally we've considered actually reaching out to those top phone providers and ask to be put on the whitelist; not sure if you or anybody on here has tried anything similar.

Re: Did you know you can put a whole game inside of a push notification

#75

I'd prefer Apple to fix horrible notifications on iOS. Since they broke VoIP background notifications, developers have no way to reliably perform silent delivery of information to device. For example in a chat app that syncs with desktop you can deliver incoming messages, showing them as alerts, but you can't deliver your own, because you MUST show alert on every push notification. Another use case is removing notifi…

Why would you need to notify user of his own messages ? Can't you just do a sync pull once the chat is up ? I feel like using notifications to deliver messages is unreliable anyway you are going to sync on focus.

It's not for the purpose of notifications, it's for the purpose of sync. If you do not initiate sync process after even own messages, immediately after launch of the app you'll see only incoming messages, and own will load up after a significant delay. That is not what chat users are used to these days.

Also: read markers. You definitely want notifications of messages you've read elsewhere to disappear from the iPhone. Currently, there is no good way to do that.

Re: Did you know you can put a whole game inside of a push notification

#76

I'd prefer Apple to fix horrible notifications on iOS. Since they broke VoIP background notifications, developers have no way to reliably perform silent delivery of information to device. For example in a chat app that syncs with desktop you can deliver incoming messages, showing them as alerts, but you can't deliver your own, because you MUST show alert on every push notification. Another use case is removing notifi…

Huh? We use silent pushes all the time to sync stuff. Works great.

Silent pushes don't work at all if you swipe the all. AT ALL.

Re: Did you know you can put a whole game inside of a push notification

#77
post #39

Earlier quoted context omitted.

I’m with you. Story time: Years ago the Signal app would silently wake up in the background, upload 20MB+ of my contacts’ photos, and then shutdown and do it all over again every time I received a silent notification. Due to my membership in a few large groups this was very often. The result was gigabytes of cellar data usage in a week. Fortunately my experience was rare because I both had a lot of contacts with phot…

Fun fact: Apple still allows signal, telegram, WhatsApp and few other high profile developers to use VoIP notifications without mandatory calling up VoiceKit. Because they can't work as smooth as users are used to they work with these new rules for notifications. So, no, nothing 'improved' in your Signal experience. At least, not yet. All developers are equal, but some are more equal than others.

To be honest, all developers have never been equal. At least not over the last 20 years that I’ve been paying attention.

Re: Did you know you can put a whole game inside of a push notification

#78

I'd prefer Apple to fix horrible notifications on iOS. Since they broke VoIP background notifications, developers have no way to reliably perform silent delivery of information to device. For example in a chat app that syncs with desktop you can deliver incoming messages, showing them as alerts, but you can't deliver your own, because you MUST show alert on every push notification. Another use case is removing notifi…

> Another use case is removing notifications: once you message on another device, you want to remove notification on iOS as well. With current notifications it is extremely problematic What is wrong with this at the moment? Ive noticed Discord does this and it works perfectly fine for me. Its the only app I have thats relevant to this feature, so I just assumed it was fine for everything.

It is likely that discord still uses 'old' VoIP notifications that worked well before iOS 12/13 dropped the hammer on them and forced developers to always show callkit on every voip notification. With those notifications, it wasn't really a problem, but apple killed them because some developers (Facebook?) abused them to gather location and other data.

Re: Did you know you can put a whole game inside of a push notification

#79
post #71
post #59

Earlier quoted context omitted.

We've also run an app with 1 million+ users for a few years, and I can confirm that notifications are a wreck on both platforms, but IMO even more so on Android/FCM. In fact most of our calculations show that we have never gone past 85% delivery of high-pri Android notifications to valid FCM tokens. By high-pri here we mean direct chat messages in an active 1-on-1 chat conversation. This has caused many users to aban…

There are some well-intended reasons for this, but unfortunately, they've resulted in many problems that don't have simple solutions. To help increase battery life, both Apple and Google provide a standard notification backend that keeps a single background connection open for every device and routes notifications to the device. Google and Apple require the use of their systems for push notifications (APNS and FCM).…

#3 shouldn't break normal apps (excluding these chinese notification solutions), it's clearly documented restrictions apps should adhere to on https://developer.android.com/guide/components/services, and https://developer.android.com/about/versions/oreo/background, with WorkManager and JobScheduler examples one should use instead. Are you saying OEMs go even deeper and interfere with these APIs rather than just stopping the background service and the process as they are allowed to, and some times must due to memory shortage?

I wouldn't be surprised if OEMs had nasty tricks going on but the dontkillmyapp.com doesn't even mention the existence of these APIs and instead try to promote some auto-start apps on boot workaround believing that the service must be running? Giving me very little confidence in the rest of what they are saying. A lot of it has become more aggressive since each release lately so that could explain confusion for old app developers.

Re: Did you know you can put a whole game inside of a push notification

#80
post #77

Earlier quoted context omitted.

Fun fact: Apple still allows signal, telegram, WhatsApp and few other high profile developers to use VoIP notifications without mandatory calling up VoiceKit. Because they can't work as smooth as users are used to they work with these new rules for notifications. So, no, nothing 'improved' in your Signal experience. At least, not yet. All developers are equal, but some are more equal than others.

To be honest, all developers have never been equal. At least not over the last 20 years that I’ve been paying attention.

On deaktops, neither windows nor dlinux do not behave differently depending on developer's name. I see no reason why mobile devices should be any different. I wonder if there are grounds for anti-monopoly lawsuits.
Post reply on HN