In a parcel-tracking app, when should the app ask for notification permission, and what should it still do for a user who refuses?
answer
- one good chance at the system prompt
- ask when the value is obvious
- after the first parcel is tracked
- refused means news on next open
- permission can change at any time
basics
~20 sAsk in context, just after the user tracks a first parcel and can see what alerts are for, not at first launch. If they refuse, show shipment news in the app when it opens, offer a settings path, and never nag.
solid answer
~50 sBoth platforms require the user's permission before an app shows alerts; on one, a new install starts with notifications off until the user grants it, and on the other the system prompt appears once and later requests return the recorded answer. That makes the first prompt valuable, and both platforms advise asking **in context**: right after the user tracks their first parcel, with a line like 'Get an alert when it's out for delivery?'. A refusal must leave a working app: the shipments list is fetched on open, statuses show in-app, a settings row explains what alerts would do and links to the system settings, and the app does not re-prompt on every launch. The client also reports the permission state with its device token, so the server stops sending alerts the phone cannot show.
go deeper
Recall that visible alerts need the user's permission on both platforms and that the best moment to ask is when the user can see why.
Explain the in-context flow with a pre-prompt, why the system prompt is precious, and how the app works fully for a user who refused.
Report the permission state with the token so the server skips alerts that cannot show, and re-read the state on each launch since users change it in settings.
Weigh alert value against prompt fatigue across features, and decide which moments in the product earn the one system prompt.
## Why the moment of asking matters A visible notification — an alert, a sound, a badge — needs the user's permission on both native platforms, and so does any notification the app posts itself after a data-only push wakes it. The two platforms differ in detail, but both make the first request precious: - On one platform, recent OS versions make notifications a **runtime permission**: a newly installed app's notifications are off by default until the user grants it, and the app decides when the dialog appears. - On the other, the first request shows the system prompt and the answer is **recorded**; later requests do not prompt the person again. - Both platforms' guidance is to ask **in context**, where the purpose is obvious, rather than automatically at first launch. A user asked at first launch, before they have tracked anything, has no reason to say yes. A user who has just pasted a tracking number has an obvious one. The decision is also sticky: the user can reverse it later only in the system settings, which few people visit. ## When to ask in a parcel-tracking app 1. The user opens the app for the first time: no prompt. Show the value of the app first. 2. The user tracks their first parcel. The app shows its own short screen: "Get an alert when it's out for delivery, when the driver is close, and if a signature is needed?" with *Turn on* and *Not now*. 3. Only on *Turn on* does the app trigger the system prompt. 4. On *Not now*, the app keeps the system prompt unspent and offers again at a later meaningful moment, such as the first parcel marked "signature required". The app's own pre-prompt is common practice rather than a platform rule; it costs one screen and protects the one system prompt that counts. ## What a refusal must still allow Refusing alerts must not break tracking. The refused case is designed as **"no visible alerts, so the app shows the news when it is next opened"**: - The shipments list is fetched on every launch and return to the foreground, exactly as for everyone else. - Status changes since the last visit are highlighted in the list, so a user without alerts still sees what moved. - Urgent news the alert would have carried, such as a parcel that needs a signature tomorrow, appears as a banner on that parcel's card the moment the app opens. - A settings row says what alerts would add and links to the system's notification settings, because only the user can change the decision there. - The app does not show its pre-prompt on every launch. A user who has said no twice has answered. - The app reads the permission state on every launch, because the user can change it in system settings at any time. Whether a refusal also affects data-only pushes is not something to build on; those are best effort anyway, and the on-open fetch already covers them. ## Telling the server The client sends the current permission state along with its device token whenever either changes. That matters for two reasons: | Without the flag | With the flag | |---|---| | The server sends high-priority alerts the phone will never show | The server skips visible alerts for this device | | On one service, high-priority messages that never lead to a visible notification get the app's messages demoted | The app's high-priority pushes stay prompt for users who allowed them | | The notification pipeline cannot tell an unreachable user from one who chose no alerts | The pipeline can choose another channel, which is its decision | ## What the user sees - First launch: the app, not a dialog. - After the first tracked parcel: one clear sentence about what alerts do, then the system prompt. - After a refusal: a working list with changes marked since the last visit, and a settings row that can turn alerts on. ## Where this question stops Each platform's prompt mechanics, its permission constants and a framework's helper calls belong to the platform and framework trees. Which alerts a user may switch off one by one, and the fallback to email or SMS, belong to the notification pipeline. This question keeps permission as one decision in the client's notification design: when to spend the prompt, and what the app promises without it.
- Why show the app's own explanation screen before the system prompt?Because on one platform the system prompt is shown once and later requests just return the recorded answer. A pre-prompt the user can decline with 'Not now' leaves the system prompt unspent for a better moment, such as the first signature-required parcel. It is common practice, not a platform rule, and it should be one screen, not a sales pitch.
- Why should the client tell the server whether notifications are allowed?So the server stops sending visible alerts that cannot be shown. On one service, high-priority messages that never result in a visible notification lead to the app's messages being demoted to normal priority, slowing alerts for everyone on that device. The flag also lets the notification pipeline decide whether another channel is warranted.
- Asking at first launch gets the most users to say yes.
- A refused prompt can simply be shown again on the next launch.
- Without permission the app is useless, so block tracking until it is granted.
- Once granted, permission stays granted, so there is no need to check again.
- A refusal can be bypassed by posting the alert from a data-only push.