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.

📱Permission screen — lightlight/docs/screens/permission-light.png
📱Permission screen — darkdark/docs/screens/permission-dark.png

feature/permissions/PermissionScreens.kt · core/designsystem/permission/KitPermissionScreen.kt

The eight screens

ScreenAndroid permission
NotificationsPermissionScreenPOST_NOTIFICATIONS (API 33+)
CameraPermissionScreenCAMERA
MicrophonePermissionScreenRECORD_AUDIO
PhotoPermissionScreenREAD_MEDIA_IMAGES / legacy storage
ContactsPermissionScreenREAD_CONTACTS
CalendarPermissionScreenREAD_CALENDAR
LocationPermissionScreenACCESS_FINE_LOCATION
MotionPermissionScreenACTIVITY_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-only permissions (Tracking, Music Library) intentionally omitted

See also: Features → Security & ops