Permission Screens
Eight prebuilt, full-screen permission flows — pretty "allow camera / photos / notifications" screens that explain why before the OS dialog, and recover gracefully when a permission is permanently denied.
/docs/screens/permission-light.png/docs/screens/permission-dark.pngfeature/permissions/PermissionScreens.kt · core/designsystem/permission/KitPermissionScreen.kt
The eight screens
| Screen | Android permission |
|---|---|
NotificationsPermissionScreen | POST_NOTIFICATIONS (API 33+) |
CameraPermissionScreen | CAMERA |
MicrophonePermissionScreen | RECORD_AUDIO |
PhotoPermissionScreen | READ_MEDIA_IMAGES / legacy storage |
ContactsPermissionScreen | READ_CONTACTS |
CalendarPermissionScreen | READ_CALENDAR |
LocationPermissionScreen | ACCESS_FINE_LOCATION |
MotionPermissionScreen | ACTIVITY_RECOGNITION (API 29+) |
Each is a one-line wrapper over the parameterised KitPermissionScreen.
Usage
Drop a screen into your nav and handle the outcome:
CameraPermissionScreen(
onGranted = { nav.navigate(Route.Scanner) },
onSkip = { nav.popBackStack() },
)
The underlying KitPermissionScreen (if you need a custom permission): icon → title →
rationale → Allow / Skip. It auto-swaps "Allow" → "Open Settings" and shows a
denied-state rationale when the OS marks the permission permanently denied, so the user
always has a forward path.
Lighter touch — the primer sheet
For an in-context nudge instead of a full screen, use the bottom-sheet primer:
KitPermissionPrimerSheet(
permission = KitPermission.NOTIFICATIONS,
onGranted = ::scheduleReminders,
onDismiss = { showPrimer = false },
)
Manifest opt-in
The 8 <uses-permission> lines ship commented out in AndroidManifest.xml — uncomment
only the ones your app actually uses (unused permissions bloat your Play Data Safety form).
Features
- 8 ready screens + a parameterised base for custom permissions
- SDK-aware (handles the 33+ / 29+ permission gates + legacy fallbacks)
- Permanent-deny recovery → "Open Settings"
- Bottom-sheet primer variant for in-context asks
iOS-onlypermissions (Tracking, Music Library) intentionally omitted
See also: Features → Security & ops