Skip to content
All articles
Mobile Development6 min read

Push notifications in a mobile app: plan them first

How push notifications in a mobile app work, when Android and iOS ask permission, what to send and what never to send, and how to tell when users switch off.

EK

EK Ra Sunya team

EK Ra Sunya Inc.

Push notifications in a mobile app reach the phone through the platform's own delivery service: Google's transport for Android and Apple's Push Notification service (APNs) for iPhones, usually reached through Firebase Cloud Messaging. Delivery is the easy part. On both Android 13 and later and iOS, the user has to say yes first, and they only get asked properly once. Plan when you ask, what you'll send, and how you'll know when people switch you off, before the app is built.

How does a push notification actually reach the phone?

There are four parts, and it helps to know them when a developer says "notifications aren't arriving".

Google's Firebase Cloud Messaging architecture page describes them in order:

  1. Your server (or a cloud function) decides a message should go out and sends it to FCM.
  2. The FCM backend accepts the request, gives it a message ID and fans it out if it is going to many devices.
  3. The platform transport layer carries it to the phone. On Android that is Google's own transport. On Apple devices it is APNs. Web apps use the web push protocol.
  4. The app on the phone receives it and either shows it or handles it in code.

Each installed copy of your app registers and gets a token that identifies it. Your server stores those tokens and sends to them. Firebase's documentation on managing tokens says a token whose device has not connected for about a month should be treated as stale, and Android registrations inactive for 270 days expire. A server that never cleans up old tokens keeps sending to phones that are gone, and your delivery numbers look worse than they are.

FCM supports two kinds of message. A notification message is displayed for you. A data message hands a payload to your app's code, which decides what to do. Data messages are how an app quietly refreshes an order status without showing anything.

When do Android and iOS ask the user for permission?

This is the part that decides whether anyone sees your notifications at all.

Android. From Android 13, posting notifications needs a runtime permission called POST_NOTIFICATIONS. Android's notification permission guide says that when a user installs an app on Android 13 or higher, its notifications are off by default, and the app must wait until the user grants the permission. If the app targets Android 13 or higher, it controls when the dialog appears.

iOS. Apple's guide to asking permission says the system prompts the person the first time the app requests authorization and records the answer. Later requests don't prompt again. After a "no", the only way back is the user changing it in Settings.

Both platforms give the same advice about timing: ask in context, not on first launch. Android's examples are the user tapping a bell icon, following someone, or placing a food delivery order. Apple's example is a task app asking after the person schedules their first task.

So the design question is simple to state. What moment in your app makes the value of a notification obvious? For a booking app it is the booking confirmation screen. For a school app it might be when a parent first opens their child's results. Put the request there, with a line explaining what they'll receive.

iOS also offers provisional authorization. The app can send notifications quietly to Notification Center without asking first, each with buttons to keep or turn them off. It suits apps whose notifications are useful but easy to underrate before people see one.

What should an app send, and what should it never send?

Send things the user would be annoyed to miss. An order status change, a booking reminder, a reply to their message, a payment received. These are events about something the person did or asked for.

Apple's App Review Guideline 4.5.4 sets three rules that are sensible on Android too:

  • The app must work without them. Push notifications must not be required for the app to function.
  • No sensitive personal or confidential information. A notification can appear on a lock screen that someone else is looking at. Write "Your test results are ready" and open the detail inside the app.
  • Marketing needs explicit opt-in. Promotional pushes need the user's consent, shown in the app's own interface, and a way to opt out inside the app.

That third rule points to a design choice worth making early: separate transactional notifications from promotional ones. On Android, notification channels let the user switch off one category without losing the rest. Give users a settings screen in your app with the same split. Someone who mutes offers but keeps order updates is still reachable. Someone offered only "all or nothing" may well pick nothing.

NotificationSend it?
Order shipped, booking confirmed, payment receivedYes, it's about the user's own action
Reply or mention from another userYes, if they asked for it in settings
Offer or promotionOnly with explicit opt-in and an in-app opt-out
Account balance, medical detail, full message textNo, keep it inside the app
"We miss you" with nothing newNo

How do you know when users switch notifications off?

Sends and opens are easy to count. The number that matters more is how many users can still receive anything at all.

Both platforms let the app check. On Android, areNotificationsEnabled() tells the app whether notifications are on. On iOS, the app can read its current notification settings from the notification center, and Apple tells developers to check before scheduling, because people can change the setting at any time. Android's guide adds that users can see how many notifications an app sends each day and can revoke the permission whenever they like.

Ask your developer to record the permission state each time the app opens and send it to your analytics. Then you can track:

  • the share of active users with notifications enabled
  • how that share moves after you send a campaign or change a message
  • how many tokens your server gets back as invalid, which Firebase reports with errors such as UNREGISTERED

If the enabled share falls after a week of heavy sending, that's your answer about frequency. It costs nothing to collect, and it's hard to add later because you lose the history.

What does this mean for the build plan?

Notifications touch the app, the server and the content plan, so they belong in the requirements, not in a list of extras. Write down which events trigger a notification, which are promotional, where the permission request appears, and who on your side writes the text.

If you're still choosing between a web app and a native one, notifications are part of that decision. Our post on progressive web apps versus mobile apps covers the trade-offs. And once the app is ready, publishing it on Google Play comes with its own checklist.

Frequently asked questions

Can a notification carry the full content, such as a whole message?

Keep it short. Firebase documents a payload limit of 4096 bytes for messages to a client app, and Apple's guideline rules out sensitive information anyway. Send a short alert and let the app fetch the detail when it opens.

Can I ask for notification permission again after a user says no?

On iOS the system prompt appears only once, so after a refusal you can show your own screen explaining the benefit and link to Settings. On Android 13 and later, follow the platform's rationale flow and accept that repeated asking damages trust.

Does the choice between Flutter and React Native affect notifications?

Both can use FCM and reach APNs through it, so either works. The framework choice turns on other factors, covered in our Flutter vs React Native comparison.

Should notifications be in the first version of the app?

If a core action depends on the user hearing back, such as an order or a booking, yes. Promotional notifications can wait until you know what users value.

Getting notifications right from the start

Our mobile development team builds cross-platform iOS and Android apps with Flutter and React Native. If you're planning an app and want to work out what it should send and when, tell us about it.

Have a project in mind?

Let us help you build something scalable, fast, and built to last.

Start a conversation