1. Home
  2. Blog
  3. Mobile App Development
  4. How to Add Push Notifications to a Mobile App

How to Add Push Notifications to a Mobile App

Business colleagues working in an office — how to add push notifications to a mobile app

How push notifications work

A push notification is a message sent from your server to a specific device through the platform's delivery service, which wakes the app or shows an alert even when the app is closed. On Android the delivery service is Firebase Cloud Messaging (FCM); on iOS it is the Apple Push Notification service (APNs). Your app registers with the service, receives a device token, and sends that token to your backend. To notify a user, your backend sends the message and token to the service, which delivers it to the phone. Three points follow from this. First, you never send notifications directly from one phone to another; everything goes through your backend and the platform service. Second, the token is the address, and tokens change when users reinstall, restore or update the app, so your backend must keep them current. Third, delivery is best-effort: the platform services do not guarantee arrival, which is why critical messages need a fallback. Most teams use FCM for both platforms, since it forwards iOS messages to APNs, giving one integration on the backend. Cross-platform frameworks such as Flutter and React Native have mature plugins for it.

Push vs SMS vs WhatsApp vs in-app: choosing the channel

The difference between the channels is cost, reach and reliability. Push is free but reaches only users who installed the app and allowed notifications. SMS reaches every phone at a per-message fee and is subject to Nigerian Communications Commission rules on marketing messages and Do-Not-Disturb registrations. WhatsApp Business Platform messages cost per conversation and need templates approved by Meta, but are read at high rates. In-app messages appear only when the user opens the app.

ChannelCost patternReachReliabilityBest for
PushFree at typical volumeInstalled users with permissionBest-effort; device settings interfereOrder updates, reminders, activity alerts, timely offers
SMSPer message, in nairaEvery phoneHigh, subject to DND for marketingOTPs, critical fallbacks, users without the app
WhatsApp (Business Platform)Per conversation, USD-linkedUsers who opted inHigh read rates; template approval neededReceipts, reminders, two-way support
In-app messageFreeUsers currently in the appCertain, but only when openedOnboarding, announcements, upgrade prompts
EmailLow per messageUsers with email they checkModerate in NigeriaReceipts, statements, B2B

Most Nigerian apps land on a layered approach: push for everything routine, SMS or WhatsApp as fallback for anything the customer must receive, and in-app messages for context that can wait.

Platform setup: Firebase, APNs and permissions

The platform setup is mostly configuration, but each item is a point where projects stall:

  • Firebase project. Create a Firebase project, register the Android and iOS apps, and add the configuration files to the app. Firebase Cloud Messaging is free for sending.
  • Apple requirements. iOS push needs an Apple Developer Program membership (US$99 per year historically; verify), a push notification capability enabled on the app identifier, and an APNs authentication key uploaded to Firebase. Without the Apple account, iOS push cannot be tested on real devices.
  • Android permission. Since Android 13, apps must request a runtime notification permission; older versions grant it by default. Your app must handle both.
  • iOS permission. iOS has always required an explicit permission prompt, and the system shows it only once. If the user declines, they must change it in Settings, which few do.
  • Notification channels on Android. Android groups notifications into channels (for example "Order updates" and "Promotions") that users can control individually. Define them deliberately; a single "Miscellaneous" channel gives users only an all-or-nothing switch.
  • Device testing. Emulators do not fully reproduce push behaviour. Test on real devices, including the mid-range Android models common in Nigeria.

The backend notification service you actually need

Tutorials show a developer sending a test message from the Firebase console. A business needs a service on its backend that does considerably more:

  1. Token registry. Store tokens per user and per device, update them when the app reports a change, and remove tokens the platform reports as invalid. Users with two phones should receive messages on both; users who uninstalled should drop off within days.
  2. Segments and topics. Send to one user (order shipped), a group (customers in Lekki), or everyone (public holiday hours). Segments should come from your own data, not be hard-coded.
  3. Templates with variables. "Your order #{number} has been dispatched and will arrive by {time}." Templates keep messaging consistent and let non-developers edit copy.
  4. Deep links. Every notification should open the right screen, not the home page. The payload carries a destination the app understands, and the app must handle it whether it was closed, in the background or already open.
  5. Scheduling and quiet hours. Queue messages, respect user time zones and preferences, and hold non-urgent messages until morning.
  6. Rate limits and frequency caps. A cap per user per day protects against a runaway script sending a hundred messages.
  7. Logging and analytics. Record what was sent, to whom, whether the platform accepted it, and whether the user opened it. Without this you cannot tell whether push is working.
  8. Triggers from business events. Order status changes, payment received, appointment tomorrow, document approved. These come from your existing systems through events or scheduled jobs.
  9. Fallback rules. For critical messages, if no delivery within a set window, send SMS or a WhatsApp template.

This service is where most of the integration cost sits, and it is reusable for every notification the app will ever send.

Earning permission and keeping it

Permission is the scarce resource. A Nigerian user who declines the prompt on first launch is gone as a push recipient, and re-enabling from device settings rarely happens. Practical rules:

  • Do not ask on first launch. Ask when the value is obvious: after the first order ("Get updates when your order ships?"), after a booking, after the user sets a reminder.
  • Use a pre-permission screen. Your own screen explaining what notifications will contain, with a "Not now" option, before triggering the one-shot system prompt. Users who say "Not now" can be asked again later; users who decline the system prompt cannot.
  • Offer a preferences centre. Let users choose categories: order updates on, promotions off. This retains the messages that matter when a user is annoyed by one campaign.
  • Match the promise. If the pre-permission screen said "order updates", the first promotional push will feel like a betrayal. Send promotions only to users who chose them.
  • Marketing consent. Promotional notifications are direct marketing. Under the Nigeria Data Protection Act 2023, record the basis for sending them, honour opt-outs promptly and document it. Confirm specifics with the NDPC's guidance or a qualified adviser.

Making push reliable on Nigerian phones

Push reliability in Nigeria has one dominant problem: aggressive battery management on popular Android phones. Many devices from brands common in the market, and some Xiaomi, Oppo and Samsung models under certain settings, kill background processes to save battery, which can delay or drop notifications, especially data-only messages that need the app to wake and process them. Add data-saver modes, intermittent connectivity, and phones that are switched off during power cuts, and best-effort becomes genuinely uncertain. What helps:

  • Send notification messages, not only data messages. A notification message displayed by the system arrives more reliably than a data-only message that needs the app to run.
  • Use high priority for time-sensitive messages and normal priority for the rest, following platform guidance; misusing high priority leads to throttling.
  • Keep payloads small. Large images and long payloads fail more on weak connections.
  • Design the app to reconcile on open. When the user opens the app, fetch the latest state from the backend regardless of what notifications arrived. Push should never be the only way the app learns something.
  • Guide users on battery settings. For apps where alerts matter (riders, agents, parents), a short in-app guide to allowing background activity for common phone brands measurably improves delivery.
  • Fallback for what must arrive. OTPs, payment confirmations and safety alerts go to SMS or WhatsApp if push is not confirmed within minutes.
  • Watch delivery and open rates by device model. Your logs will show which brands and Android versions underperform, and where to focus.

How to add push notifications to a mobile app: step by step

  1. List every notification the app should send. For each: trigger, audience, urgency, category, deep-link destination, and whether it needs a fallback.
  2. Set up Firebase and Apple. Register apps, upload the APNs key, add configuration, and define Android notification channels matching your categories.
  3. Add the client integration. Request permission with a pre-permission screen at the right moment, obtain and refresh tokens, send them to your backend with the user and device identity, handle notification taps and deep links in all app states.
  4. Build the backend service. Token registry, segments, templates, scheduling, frequency caps, logging, fallback rules, and an admin screen for manual sends.
  5. Wire triggers to business events. Order status, payments, appointments, approvals, from your existing backend.
  6. Build the preferences centre. Category toggles synced to the backend and reflected in Android channels.
  7. Test on real devices. Cover closed, background and foreground states, both platforms, permission declined, token refresh after reinstall, and at least three common Nigerian Android models with battery optimisation on.
  8. Launch with transactional messages only. Get order updates and reminders working and measured before any campaign.
  9. Review weekly. Delivery and open rates by message type and device, opt-out rates, and complaints. Prune messages that users ignore.

Example (hypothetical): an Enugu school group adds fee and results alerts

Example (hypothetical): a group of three private schools in Enugu has a parent app used for announcements and fee payment, but staff still send fee reminders by SMS at a cost that rises every term, and results announcements arrive by WhatsApp broadcast to numbers that change often. The team lists the notifications: fee due in seven days, fee overdue, results published, event reminder, emergency closure. They set up Firebase with an APNs key for the iPhone-using minority of parents, define Android channels for "Fees", "Academics" and "Events", and ask for permission after a parent completes the first fee payment in the app, with a pre-permission screen that names the three categories. The backend service stores tokens per parent per device, pulls triggers from the school management system's fee and results events, and applies a rule: fee-overdue and emergency messages fall back to SMS if not delivered within thirty minutes; everything else is push only. Deep links open the specific child's fee page or result. After one term, the schools review delivery by device model and add an in-app guide on battery settings for the two phone brands with the lowest delivery. SMS spend drops to fallback volumes only. The figures are illustrative and not client results.

How much does it cost to add push notifications?

Indicative 2026 ranges are shown below; actual quotes vary with scope, vendor and exchange rate. Push is unusual in that sending is free through Firebase at typical volumes; the cost is in the integration and the backend service.

Cost itemIndicative 2026 rangeNotes
Notification inventory and permission design₦50,000–₦200,000Often part of scoping
Platform setup (Firebase, APNs, channels)₦50,000–₦200,000Requires Apple Developer account
Client integration: permission flow, tokens, deep links, preferences₦100,000–₦400,000Both platforms
Backend service: registry, segments, templates, scheduling, logging₦150,000–₦600,000The reusable core
Event triggers and fallback rules₦50,000–₦300,000Depends on existing systems
Device testing across Nigerian Android models₦30,000–₦150,000Do not skip
Typical total₦200,000–₦1,200,000Higher end includes admin tools and analytics

Recurring costs, separate from the build: Firebase Cloud Messaging is free for sending; the Apple Developer Program fee applies if you do not already hold it; SMS and WhatsApp fallback messages are charged per use; and third-party notification platforms, if you choose one over building your own service, are subscription products priced in US dollars. Maintenance sits within the app's normal 15–25 percent per year budget. When comparing quotations, ask whether the backend service (token management, segments, logging) is included or whether the quote covers only "Firebase setup", and whether testing on real Nigerian devices is in scope.

Mistakes to avoid

  • Asking for permission on first launch. Most users decline, and on iOS you do not get a second chance.
  • No backend service. Sending from the Firebase console does not scale past the first campaign and leaves no record.
  • Deep links that open the home screen. A notification about an order that does not open the order trains users to ignore notifications.
  • One notification channel on Android. Users can only switch everything off.
  • Data-only messages for important alerts. Battery optimisation on common Nigerian phones drops them.
  • Push as the only channel for OTPs or payment confirmations. Best-effort is not enough for money.
  • Promotions to everyone. Opt-outs and uninstalls follow. Segment and cap frequency.
  • Never removing dead tokens. Your delivery rates will look worse than they are and your sends will slow.

Conclusion

Adding push notifications is a small platform setup and a meaningful backend project. Register with Firebase and Apple, ask for permission when the value is clear rather than on first launch, and build the service that stores tokens, segments audiences, fills templates, opens the right screen and logs what happened. For Nigerian users, plan for battery-managed Android phones and intermittent connectivity with system-displayed messages, an app that reconciles on open, and SMS or WhatsApp fallback for anything that must arrive. Start with transactional messages, measure, then earn the right to promote. If your app needs notifications that reliably reach customers, riders, parents or staff across the phones Nigerians actually use, Linestech can integrate push into your Android and iOS app and build the backend service and fallbacks around it.

Frequently asked questions

Are push notifications free to send?

Sending through Firebase Cloud Messaging is free at the volumes most Nigerian apps reach, on both Android and iOS. The costs are the developer time to integrate and build the backend service, the Apple Developer Program fee for iOS, and any SMS or WhatsApp fallback messages you send when push is not confirmed.

Why do my notifications arrive late or not at all on some Android phones?

Usually battery optimisation. Many popular Android models restrict background activity and delay or drop messages, especially data-only ones. Use notification messages the system displays, set priority correctly, guide users to allow background activity for your app, and have the app refresh its state when opened.

Do I need an Apple Developer account for push on iPhone?

Yes. iOS push requires the Apple Developer Program membership and an APNs key configured for your app. Without it you cannot deliver to iPhones or test on real devices. The fee is yearly and in US dollars; verify the current amount.

Can I send push notifications to users who have not installed the app?

No. Push only reaches devices with the app installed and notifications permitted. For everyone else, SMS or WhatsApp is the channel, which is why most apps combine them.

How many notifications per week is too many?

There is no universal number, but transactional messages the user expects (order updates, reminders) are tolerated at almost any frequency, while promotional messages beyond one or two a week drive opt-outs. Watch your own opt-out and uninstall rates by message type and cap accordingly.

Transactional notifications tied to a service the user requested generally rest on that relationship; promotional notifications are direct marketing and should have a documented basis and an easy opt-out. Record preferences, honour changes promptly, and confirm specifics with the NDPC's guidance or a qualified adviser.

Sources and further reading

Figures, platform rules and regulations change. These are the primary references behind this article and the places to check before you act on it.