CalendarPermissionHandler
Component Detail
Infrastructure
medium complexity
mobile
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Handles OS-level calendar permission requests on iOS and Android, presenting clear rationale messaging to the user before the system prompt appears. It stores the user's permission decision and surfaces appropriate fallback behaviour when permission is denied, ensuring core app functionality is never degraded by a declined request.
calendar-permission-handler
Sources & reasoning
HLF explicitly named calendar synchronization alongside push notifications as part of their follow-up improvement plan (line 116). The phase matrix places this in Fase 2 (v1.0) alongside push and BankID, consistent with the "should have" classification.
-
docs/source/likeperson.md · line 116Oppfølging av likepersoner: 40 % var ikke fornøyd med oppfølgingen i spørreundersøkelse. Scenariobaserte push-meldinger og kalendersynkronisering.
Responsibilities
- Request calendar read/write permissions from the device OS with rationale copy
- Persist and expose the current permission state (not-determined, granted, denied, restricted)
- Provide a graceful degradation path when the user declines permission
- Direct users to device settings when permission was previously denied and needs to be re-granted
- Guard CalendarSyncService calls by checking permission state before any calendar access
Interfaces
requestCalendarPermission(): Promise<PermissionStatus>
getPermissionStatus(): PermissionStatus
openDeviceSettings(): void
isPermissionGranted(): boolean