Setting up push notification system in games

Our video game development company runs independent projects, jointly creates games with the client and provides additional operational services. Expertise of our team allows us to cover all gaming platforms and develop an amazing product that matches the customer’s vision and players preferences.
Showing 1 of 1 servicesAll 242 services
Setting up push notification system in games
Medium
~2 business days
FAQ
Our competencies
What are the stages of Game Development?
Latest works
  • image_games_mortal_motors_495_0.webp
    Game development for Mortal Motors
    663
  • image_games_a_turnbased_strategy_game_set_in_a_fantasy_setting_with_fire_and_sword_603_0.webp
    A turn-based strategy game set in a fantasy setting, With Fire and Sword
    859
  • image_games_second_team_604_0.webp
    Game development for the company Second term
    490
  • image_games_phoenix_ii_606_0.webp
    3D animation - teaser for the game Phoenix 2.
    533

Game Push Notification System Setup

Push-notifications in games work until they're too many or come at wrong time. After that player disables them in phone settings — and lost forever for this channel. Task when setting up system — build mechanics so notifications are timely, not annoying.

Technical base: FCM and APNs

Firebase Cloud Messaging — de-facto standard for mobile games on Android and iOS. On iOS under FCM works APNs (Apple Push Notification service) as transport. Important: APNs certificates have lifetime, after expiry push-notifications on iOS silently stop arriving. Typical situation: team doesn't track expiry, year after launch iOS-players stop receiving notifications, cause found accidentally.

FCM supports two message types: notification message (displays automatically by system even if app closed) and data message (only code processes it). For games almost always need data messages — allow customizing display, adding action buttons, updating badge with needed number.

Most common integration problems

Token loss. FCM-token changes: on app reinstall, data clear, sometimes just so — FCM rotates tokens. If server doesn't track onTokenRefresh and update token in database, notifications go to void. On Unity — FirebaseMessaging.TokenReceived event. Token update should happen on each app launch, not only on registration.

Wrong permission request on iOS. Before iOS 12 permission asked automatically. Since iOS 12+ need explicit UNUserNotificationCenter.requestAuthorization. Request moment critical: request on first game open gives ~40% agreement, request after player gets first win or reward — 60–70%. Difference only in timing.

Delivery force-quit on Android. Some manufacturers (Xiaomi, Huawei, OnePlus) aggressively kill background processes. FCM-notifications via Google Play Services work around this, but if user has no GMS (Huawei HarmonyOS), need separate channel via HMS Core (Huawei Mobile Services). For games with audience in China or on Huawei-devices mandatory.

Designing notifications for game

Smart push-notification system built around game triggers, not schedule. Schedule ("send at 7pm to everyone") — worst option. Triggers:

  • Timer events: "your building finishes in 5 minutes" — scheduled notification, set locally via UNUserNotificationCenter (iOS) or AlarmManager / WorkManager (Android), without server. Important: such notifications don't require server push and work without internet
  • Reactive events: "friend beat your record" — server push via FCM
  • Retention triggers: "you haven't logged in 2 days, your resources running out" — scheduled server-side via Cloud Scheduler or cron

Segmentation. FCM supports Topics (subscribe to category) and send by token list. For retention campaigns better use Firebase Cloud Functions + Firestore: function triggers by schedule, selects player segment by criteria from Firestore, sends via Admin SDK. Scales to millions users without writing own backend.

A/B test texts. Firebase A/B Testing allows testing push-notification texts straight from console. Variant A: "Your resources running out," variant B: "Goblins will raid warehouse in 3 hours." Second variant stably shows CTR 1.5–2x higher on casual audience.

Analytics and optimization

Without metrics push system — black box. Minimal event set:

  • push_received — notification delivered (FCM delivery receipt)
  • push_opened — user tapped
  • push_dismissed — swiped without opening
  • push_opt_out — disabled notifications after receiving

CTR below 3% for retention-pushes — signal to reconsider texts or timing. Optimal time for mobile games: 7pm–9pm user's local time (not server's).

Work stages

  1. Audit current integration — tokens, permissions, certificates
  2. Design triggers — event map, segments, frequency
  3. Server part — Cloud Functions / own backend, message templates
  4. Client integration — handle foreground/background/terminated states
  5. Local notifications — timer events without server
  6. Analytics — event markup, dashboard
Scale Duration
Basic FCM integration (server pushes only) 3–5 days
Full system with local notifications and segmentation 2–3 weeks
System with HMS (Huawei), analytics, text A/B tests 4–6 weeks

Cost determined individually after analyzing current architecture and platforms.