Push Notification Service
Component Detail
Service Layer
high complexity
mobile
2
Dependencies
3
Dependents
7
Entities
0
Integrations
Description
Core service managing the full lifecycle of push notifications on the mobile client, including FCM token registration, permission request flows for iOS and Android 13+, foreground/background message handling, and badge count state management. Integrates with firebase_messaging and surfaces notification events to the UI layer via reactive streams.
push-notification-service
Responsibilities
- Request and manage push notification permissions (iOS opt-in, Android 13+ POST_NOTIFICATIONS)
- Register and refresh FCM device tokens on login and token rotation
- Handle foreground, background, and terminated-state message delivery
- Expose unread count stream consumed by the badge widget
- Route notification tap events to the correct screen
Interfaces
initialize()
requestPermission()
getPermissionStatus()
registerDeviceToken(userId)
refreshDeviceToken()
onForegroundMessage(handler)
onBackgroundMessage(handler)
onNotificationTap(handler)
getUnreadCountStream()
resetBadgeCount()
Relationships
Dependencies (2)
Components this component depends on
Dependents (3)
Components that depend on this component
Related Data Entities (7)
Data entities managed by this component