Grant and Manage Push Notification Permissions
The app must request notification permissions at the right moment during the onboarding flow, after the user has seen the value of the feature rather than immediately at first launch. The request must comply with iOS and Android permission models. The FCM device token must be registered in the backend upon permission grant and updated whenever the token rotates. If the user denies permissions, the app must degrade gracefully and provide in-app alternatives such as the notification centre. A settings shortcut must allow the user to re-enable permissions at any time.
User Story
Acceptance Criteria
- Given a peer mentor completes initial login, when they reach the onboarding step that explains notifications, then the OS permission dialog is shown with a contextual pre-prompt message explaining the benefit
- Given the user grants notification permission, when the FCM token is generated, then the token is stored in the backend linked to the user's profile within 5 seconds
- Given the user denies notification permission, when they navigate to notification settings in the app, then a button is displayed that opens the OS system settings to allow them to re-enable notifications
- Given the FCM token rotates (OS refreshes it), when the app detects the new token, then it is automatically updated in the backend without user action
- Given the user has denied permissions, when a notification trigger fires, then an in-app banner or notification centre entry is created as a fallback so the event is not silently lost
Business Value
Push notifications only function if permission is granted and the FCM token is correctly registered. A poorly timed permission prompt causes denial rates above 60% on iOS, which would cripple the entire notification delivery system. A well-explained, contextually timed prompt significantly improves opt-in rates and ensures mentors stay informed without having to poll the app.
Components
- Notification Permission Manager service
- FCM Token Manager infrastructure
- Notification Settings Screen ui
- Notification Repository data
- Notification Preferences Repository data
- Scenario Notification Detail View ui
- Notification Accessibility Announcer infrastructure