Overview
Push notifications keep users informed:- Chat Messages: New messages in reports
- Expense Updates: Approvals, comments, status changes
- Mention Notifications: When you’re @mentioned
- Task Assignments: New tasks assigned to you
- Report Submissions: When reports are submitted for approval
Notifications use Urban Airship SDK for reliable cross-platform delivery.
Architecture
Push Notification Flow
Native Integration
- iOS
- Android
iOS uses APNs (Apple Push Notification service):
ios/AppDelegate.swift
iOS Notifications
Configuration
Airship configuration inios/AirshipConfig.plist:
ios/AirshipConfig.plist
Communication Notifications (iOS 15+)
iOS 15+ enriched notification UI with avatars:ios/NotificationServiceExtension/NotificationService.swift
Payload Parsing
Testing iOS Notifications
To test with Staging/Production API during development: HybridApp: EditMobile-Expensify/iOS/AirshipConfig/Debug/AirshipConfig.plist
ios/AirshipConfig.plist with production values.
Android Notifications
Configuration
Airship configuration inandroid/app/src/main/assets/airshipconfig.properties:
android/app/src/main/assets/airshipconfig.properties
Custom Notification Provider
android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java
Payload Handling
android/app/src/main/java/com/expensify/chat/customairshipextender/PayloadHandler.kt
Testing Android Notifications
To test with Staging/Production: HybridApp: EditMobile-Expensify/Android/assets/airshipconfig.properties
React Native Integration
Initialization
src/libs/Notification/PushNotification/index.native.ts
Device Registration
Deregistration
Event Handling
Binding Callbacks
Notification Types
src/libs/Notification/PushNotification/NotificationType.ts
Payload Structure
Foreground Notifications
iOS Foreground Display
src/libs/Notification/PushNotification/ForegroundNotifications/index.ios.ts
Android Foreground Display
src/libs/Notification/PushNotification/ForegroundNotifications/index.android.ts
Badge Management
Notification Permissions
Checking Permission Status
Requesting Permissions
Silent Push Notifications
For background data sync:Notification Actions
Quick Actions (iOS)
Handling Actions
Troubleshooting
Not receiving notifications
Not receiving notifications
-
Check notification permissions:
-
Verify device is registered:
-
Check Airship configuration:
- iOS:
ios/AirshipConfig.plist - Android:
android/app/src/main/assets/airshipconfig.properties
- iOS:
Notifications not showing in foreground
Notifications not showing in foreground
iOS: Check foreground presentation options:Android: Verify channel importance is not NONE
Notification tap not opening app
Notification tap not opening app
Check deep link handling:
Badge count not updating
Badge count not updating
Best Practices
1
Request Permissions Contextually
Ask for notification permissions when the value is clear to the user
2
Handle Permission Denial Gracefully
Provide alternative ways to stay informed (email, in-app)
3
Use Silent Push for Data Sync
Don’t disturb users for background updates
4
Implement Deep Linking
Navigate directly to relevant content when notification is tapped
5
Test on Real Devices
Notifications behave differently on simulators
6
Monitor Notification Metrics
Track delivery, open rates, and engagement in Airship dashboard
Resources
Airship iOS Docs
Official Airship iOS SDK documentation
Airship Android Docs
Official Airship Android SDK documentation
APNs Overview
Apple’s Push Notification documentation
FCM Documentation
Firebase Cloud Messaging guide
Next Steps
iOS Setup
Complete iOS platform setup
Android Setup
Complete Android platform setup
Offline Mode
Offline notification handling
Receipt Scanning
Mobile receipt capture
