hasReadExternalStoragePermission

fun hasReadExternalStoragePermission(mediaTypes: Set<MediaType> = emptySet()): Boolean

Checks if the application has permission to read external storage or specific media types.

For Android versions below 13, it checks for READ_EXTERNAL_STORAGE. For Android 13 and above, it checks for specific media permissions.

Return

true if all required permissions are granted, false otherwise.

Parameters

mediaTypes

The specific media types to check permissions for (only applicable for Android 13+).