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) orAlarmManager/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
- Audit current integration — tokens, permissions, certificates
- Design triggers — event map, segments, frequency
- Server part — Cloud Functions / own backend, message templates
- Client integration — handle foreground/background/terminated states
- Local notifications — timer events without server
- 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.





