Reference

Runtime Permissions (Android)

Runtime permissions are dangerous-level Android permissions that an app must request from the user while it is running, not just declare in its manifest. Introduced in Android 6.0 (API 23), they show a system dialog the user can grant or deny. A storage cleaner uses them to ask for access to your photos and media before it can scan them.

Build & packagingAndroid

Runtime Permissions (Android)

Also known as: android runtime permissions, request permission

Runtime permissions are dangerous-level Android permissions that an app must request from the user while it is running, not just declare in its manifest. Introduced in Android 6.0 (API 23), they show a system dialog the user can grant or deny. A storage cleaner uses them to ask for access to your photos and media before it can scan them.

  • Runtime permissions arrived in Android 6.0 (API 23); dangerous permissions are granted while the app runs, not at install.
  • Apps request them via requestPermissions() / ActivityResultContracts and check state with checkSelfPermission().
  • Two denials mark a permission as permanently denied, after which only the system Settings screen can re-grant it.

How runtime permissions work

Since Android 6.0 (API 23), permissions classed as dangerous (those touching private user data like media, location, or contacts) are granted at runtime instead of at install. The app declares them with uses-permission in AndroidManifest.xml, then calls requestPermissions() to trigger the system grant dialog.

Before acting, an app checks state with ContextCompat.checkSelfPermission() and receives the result in onRequestPermissionsResult() (or via the modern ActivityResultContracts.RequestPermission API). The grant is per-permission and the user can revoke it later in Settings.

Denial states and re-prompting

If a user denies, the app can request again. If they deny a second time (or check 'Don't allow' / 'Deny'), the OS treats it as permanently denied and shouldShowRequestPermissionRationale() returns false, so the dialog no longer appears. At that point the app should explain why it needs access and deep-link to Settings.

Android 11+ adds auto-reset: unused permissions for apps the user hasn't opened in months are automatically revoked, requiring a fresh request on next use.

Why a cleaner needs them

A storage cleaner cannot scan your gallery without media access. On Android 13+ it requests the granular READ_MEDIA_IMAGES and READ_MEDIA_VIDEO runtime permissions; on older versions it requested the broader READ_EXTERNAL_STORAGE.

Granting the permission only lets the app read media to find duplicates, similar shots, and junk; the user stays in control and can revoke access at any time.

Related terms

Keep reading the reference.

Act on it

Guides and tools for this topic.