Mobile Push Notification Expert
Expert in implementing push notifications across iOS and Android with FCM, APNs, rich content, and deep linking.
Activation Triggers
Activate on: "push notifications", "FCM setup", "APNs configuration", "notification channels", "deep link notification", "rich notification", "notification permissions", "silent push", "notification grouping"
NOT for: In-app messaging → react-native-architect | Email notifications → devops-automator | SMS → api-architect
Quick Start
- Configure platform credentials — APNs key (iOS) and FCM server key (Android)
- Install notification library —
@react-native-firebase/messaging or expo-notifications
- Request permissions — iOS requires explicit permission; Android 13+ requires POST_NOTIFICATIONS
- Register device token — send token to backend on registration and refresh
- Handle notification tap — deep link to the relevant screen based on notification data
Core Capabilities
| Domain |
Technologies |
| Services |
Firebase Cloud Messaging (FCM v1 API), APNs, Amazon SNS |
| Libraries |
@react-native-firebase/messaging, expo-notifications, Notifee |
| Rich Content |
Images, action buttons, custom sounds, notification extensions |
| Channels |
Android notification channels, iOS categories, grouping |
| Backend |
FCM v1 HTTP API, APNs HTTP/2, OneSignal, Knock |
Architecture Patterns
Notification Handling Flow
Backend sends push
│
├─ App in FOREGROUND:
│ ├─ onMessage handler fires
│ ├─ Show in-app toast/banner (NOT system notification)
│ └─ Update badge count
│
├─ App in BACKGROUND:
│ ├─ System shows notification
│ ├─ onNotificationOpenedApp fires on tap
│ └─ Navigate to deep link target
│
└─ App KILLED:
├─ System shows notification
├─ getInitialNotification on cold start
└─ Navigate after app initialization
FCM v1 API Payload Structure
// Server-side: send notification via FCM v1 HTTP API
const message = {
token: deviceToken,
notification: {
title: 'New Order #1234',
body: 'Your order has been confirmed',
image: 'https://cdn.example.com/order-confirmed.png',
},
data: {
type: 'order_update',
orderId: '1234',
deepLink: 'myapp://orders/1234',
},
android: {
priority: 'high',
notification: {
channelId: 'orders',
clickAction: 'OPEN_ORDER',
color: '#4A90D9',
},
},
apns: {
payload: {
aps: {
sound: 'order_confirmed.wav',
badge: 1,
'mutable-content': 1, // Enable Notification Service Extension
'thread-id': 'orders', // Group notifications
},
},
},
};
Android Notification Channels
import notifee, { AndroidImportance } from '@notifee/react-native';
// Create channels on app start (Android 8+)
async function createNotificationChannels() {
await notifee.createChannelGroup({ id: 'general', name: 'General' });
await notifee.createChannel({
id: 'orders',
name: 'Order Updates',
groupId: 'general',
importance: AndroidImportance.HIGH,
sound: 'order_notification',
vibration: true,
lights: true,
lightColor: '#4A90D9',
});
await notifee.createChannel({
id: 'messages',
name: 'Messages',
groupId: 'general',
importance: AndroidImportance.HIGH,
sound: 'message_notification',
});
await notifee.createChannel({
id: 'promotions',
name: 'Promotions',
groupId: 'general',
importance: AndroidImportance.LOW, // Users can customize
});
}
Anti-Patterns
- Sending notifications without permission — Android 13+ requires runtime permission (
POST_NOTIFICATIONS). Request it at a contextually appropriate moment, not on first launch.
- Data-only payloads for visible notifications — data-only messages on iOS require background modes and do not show alerts. Use the
notification field for visible content.
- Single notification channel — all notifications at the same priority. Create separate channels (orders, messages, promotions) so users can customize per category.
- Not handling token refresh — device tokens change on app reinstall, OS update, or token rotation. Listen for
onTokenRefresh and update the backend.
- Ignoring notification grouping — 10 individual notifications from the same app annoy users. Group by thread/topic on both iOS (
thread-id) and Android (group).
Quality Checklist
[ ] APNs key and FCM credentials configured
[ ] Permission requested at contextual moment (not first launch)
[ ] Device token registered and refresh handled
[ ] Foreground, background, and killed states all handled
[ ] Deep link navigation from notification tap
[ ] Android notification channels created per category
[ ] Rich notifications with images and action buttons
[ ] Notification grouping by topic/thread
[ ] Silent push for background data refresh
[ ] Badge count management (increment/clear)
[ ] Notification analytics tracked (delivered, opened, dismissed)
[ ] Token cleanup for uninstalled apps (periodic prune)
1---2license: Apache-2.03name: mobile-push-notification-expert4description: "Mobile push notification expert for FCM, APNs, deep linking, rich notifications, and notification channels. Activate on: push notifications, FCM setup, APNs configuration, notification channels, deep link from notification, rich notification, notification permissions, silent push. NOT for: in-app messaging (use react-native-architect), email notifications (use devops-automator), SMS (use api-architect)."5allowed-tools: Read,Write,Edit,Bash(docker:*,kubectl:*,terraform:*,npm:*,npx:*)6category: Mobile Development7tags:8 - push-notifications9 - fcm10 - apns11 - mobile12pairs-with:13 - skill: react-native-architect14 reason: Notifications are a core mobile feature requiring native integration15 - skill: mobile-deep-linking-specialist16 reason: Notifications often deep link into specific app screens17metadata:18 source: https://skillmd.com/skills/curiositech/mobile-push-notification-expert19---2021# Mobile Push Notification Expert2223Expert in implementing push notifications across iOS and Android with FCM, APNs, rich content, and deep linking.2425## Activation Triggers2627**Activate on:** "push notifications", "FCM setup", "APNs configuration", "notification channels", "deep link notification", "rich notification", "notification permissions", "silent push", "notification grouping"2829**NOT for:** In-app messaging → `react-native-architect` | Email notifications → `devops-automator` | SMS → `api-architect`3031## Quick Start32331. **Configure platform credentials** — APNs key (iOS) and FCM server key (Android)342. **Install notification library** — `@react-native-firebase/messaging` or `expo-notifications`353. **Request permissions** — iOS requires explicit permission; Android 13+ requires POST_NOTIFICATIONS364. **Register device token** — send token to backend on registration and refresh375. **Handle notification tap** — deep link to the relevant screen based on notification data3839## Core Capabilities4041| Domain | Technologies |42|--------|-------------|43| **Services** | Firebase Cloud Messaging (FCM v1 API), APNs, Amazon SNS |44| **Libraries** | @react-native-firebase/messaging, expo-notifications, Notifee |45| **Rich Content** | Images, action buttons, custom sounds, notification extensions |46| **Channels** | Android notification channels, iOS categories, grouping |47| **Backend** | FCM v1 HTTP API, APNs HTTP/2, OneSignal, Knock |4849## Architecture Patterns5051### Notification Handling Flow5253```54Backend sends push55 │56 ├─ App in FOREGROUND:57 │ ├─ onMessage handler fires58 │ ├─ Show in-app toast/banner (NOT system notification)59 │ └─ Update badge count60 │61 ├─ App in BACKGROUND:62 │ ├─ System shows notification63 │ ├─ onNotificationOpenedApp fires on tap64 │ └─ Navigate to deep link target65 │66 └─ App KILLED:67 ├─ System shows notification68 ├─ getInitialNotification on cold start69 └─ Navigate after app initialization70```7172### FCM v1 API Payload Structure7374```typescript75// Server-side: send notification via FCM v1 HTTP API76const message = {77 token: deviceToken,78 notification: {79 title: 'New Order #1234',80 body: 'Your order has been confirmed',81 image: 'https://cdn.example.com/order-confirmed.png',82 },83 data: {84 type: 'order_update',85 orderId: '1234',86 deepLink: 'myapp://orders/1234',87 },88 android: {89 priority: 'high',90 notification: {91 channelId: 'orders',92 clickAction: 'OPEN_ORDER',93 color: '#4A90D9',94 },95 },96 apns: {97 payload: {98 aps: {99 sound: 'order_confirmed.wav',100 badge: 1,101 'mutable-content': 1, // Enable Notification Service Extension102 'thread-id': 'orders', // Group notifications103 },104 },105 },106};107```108109### Android Notification Channels110111```typescript112import notifee, { AndroidImportance } from '@notifee/react-native';113114// Create channels on app start (Android 8+)115async function createNotificationChannels() {116 await notifee.createChannelGroup({ id: 'general', name: 'General' });117118 await notifee.createChannel({119 id: 'orders',120 name: 'Order Updates',121 groupId: 'general',122 importance: AndroidImportance.HIGH,123 sound: 'order_notification',124 vibration: true,125 lights: true,126 lightColor: '#4A90D9',127 });128129 await notifee.createChannel({130 id: 'messages',131 name: 'Messages',132 groupId: 'general',133 importance: AndroidImportance.HIGH,134 sound: 'message_notification',135 });136137 await notifee.createChannel({138 id: 'promotions',139 name: 'Promotions',140 groupId: 'general',141 importance: AndroidImportance.LOW, // Users can customize142 });143}144```145146## Anti-Patterns1471481. **Sending notifications without permission** — Android 13+ requires runtime permission (`POST_NOTIFICATIONS`). Request it at a contextually appropriate moment, not on first launch.1492. **Data-only payloads for visible notifications** — data-only messages on iOS require background modes and do not show alerts. Use the `notification` field for visible content.1503. **Single notification channel** — all notifications at the same priority. Create separate channels (orders, messages, promotions) so users can customize per category.1514. **Not handling token refresh** — device tokens change on app reinstall, OS update, or token rotation. Listen for `onTokenRefresh` and update the backend.1525. **Ignoring notification grouping** — 10 individual notifications from the same app annoy users. Group by thread/topic on both iOS (`thread-id`) and Android (`group`).153154## Quality Checklist155156```157[ ] APNs key and FCM credentials configured158[ ] Permission requested at contextual moment (not first launch)159[ ] Device token registered and refresh handled160[ ] Foreground, background, and killed states all handled161[ ] Deep link navigation from notification tap162[ ] Android notification channels created per category163[ ] Rich notifications with images and action buttons164[ ] Notification grouping by topic/thread165[ ] Silent push for background data refresh166[ ] Badge count management (increment/clear)167[ ] Notification analytics tracked (delivered, opened, dismissed)168[ ] Token cleanup for uninstalled apps (periodic prune)169```