How it works
A push notification is a message your company’s server sends to an app on a phone, even when the app isn’t open. The server doesn’t contact the phone directly. It goes through a delivery service run by the platform owner:
- APNs (Apple Push Notification service) for iPhone and iPad.
- FCM (Firebase Cloud Messaging) from Google for Android (and it can forward to APNs for iOS too).
1Your app
Asks the user for permission, then asks the operating system for a device token.
token: a1f3…9c2APNs (Apple) / FCM (Google)
Issues the token. It is the "postal address" of this app on this device.
3Your company’s server
Stores the token next to the user account. When the order changes, it sends a message to APNs or FCM.
{ to: a1f3…9c, title: "On the way" }4APNs / FCM
Delivers the message to the device (now, or later if the phone is offline).
5The device
The operating system shows the banner, sound and badge. The app decides what happens on tap.
- The app asks for permission. Without it, the phone won’t show anything (more on this below).
- The app registers and gets a device tokenDevice tokenA unique ID that APNs or FCM gives an app on a device; the server uses it to address push notifications.Open in glossary →. A long random string from APNs or FCM that identifies this app on this device. Think of it as a postal address.
- The app sends the token to your server. The server stores it next to the user account, e.g. “Anna has an iPhone with token a1f3…9c”.
- Something happens. The restaurant confirms, the driver picks up the food, a sale starts.
- The server sends a message to APNs or FCM with the token, the text and extra data (like which order it’s about).
- APNs or FCM delivers it to the phone. If the phone is offline, they keep it for a while and deliver later.
- The operating system shows it. Banner, sound, badge (the red number on the app icon), lock screen. When the user taps it, the app opens and should take them to the right screen.
Push, local and in-app notifications
Not every notification is a push. Testers should know which kind they’re looking at, because they break in different ways:
| Kind | Who creates it | Example |
|---|---|---|
| Push (remote) | Your server, via APNs/FCM | “Your order is on the way” |
| Local | The app itself, scheduled on the phone, no internet needed | “Time for your 7 am workout”, a timer that finished |
| In-app message | The app’s own UI, only while the app is open | A banner or toastToastA short, temporary message that appears briefly and disappears on its own, like 'Message sent'.Open in glossary → inside the app: “Marco is 2 minutes away” |
A common bug is mixing them up: the server sends a push and the app schedules a local reminder for the same thing, so the user gets both.
Permission: asking at the right moment
For every permission type, the system dialogs and what happens after each answer, see App Permissions.
Users decide whether an app may notify them, and they can change their mind any time in system Settings. This is one of the app permissionsApp permissionsThe user's approval for an app to use things like the camera, location, contacts or notifications.Open in glossary → that every tester should know well.
iOS
- The app shows Apple’s system dialog: “QuickBite” Would Like to Send You Notifications, with Allow and Don’t Allow.
- iOS shows this dialog only once per install. After a “Don’t Allow”, the app can never show it again. The only way back is Settings › Notifications › QuickBite, so a good app explains that and offers a button to open Settings.
- Timing matters. Asking on the very first screen, before the user understands the app, gets a lot of “Don’t Allow”. Good apps ask in context: right after the user places their first order (“Want to know when your food is on the way?”). See Onboarding for this permission primingPermission primingExplaining in the app why a permission is needed, at the right moment, before the system dialog.Open in glossary → pattern.
- Provisional (quiet) notifications (iOS 12 and later): an app can skip the dialog and deliver notifications quietly, only to Notification Center (the list you see when you swipe down from the top of the screen), with no banner and no sound. Each one asks the user “Keep” or “Turn off”. Test that these really arrive quietly.
Android
- Android 13 and newer need a notification permission: the app shows a system dialog with Allow and Don’t allow. If the user denies it twice, Android stops showing the dialog, and only system Settings can turn notifications on.
- Android 12 and older have no dialog: notifications are on by default, and users turn them off in Settings. So test both an old and a new Android version.
- Upgrades are tricky. When a phone updates from Android 12 to 13, an app that was already allowed to notify usually keeps that permission, so existing users see no dialog. An app that hasn’t been updated for Android 13 can’t choose the moment to ask: Android shows the dialog by itself, typically on first launch. Test what existing users see after the OS update, and what new users see on a fresh install.
Dev note
POST_NOTIFICATIONS. Apps that target Android 12L (API 32) or lower get the system dialog automatically when they create their first notification channel.Check this part
Who actually delivers a push notification to an iPhone?
On iOS, the user tapped "Don't Allow" on the notification dialog. What should the app do later?