hasExternalStorageRwPermission

Returns true if the app can read and write to its scoped external storage areas.

Starting with Android 11 (API 30), scoped storage is enforced and WRITE_EXTERNAL_STORAGE/ READ_EXTERNAL_STORAGE are ignored by the system, but apps can always read and write their own scoped storage areas (app-specific directories, MediaStore, SAF) without requesting any permission, so this always returns true on those versions. It does NOT indicate access to arbitrary shared storage locations outside of those scoped areas on API 30+ — direct reads/writes to other apps' files or unscoped shared paths still require the user to grant access through the Storage Access Framework.

Return

true if the app has read and write access to its scoped external storage areas, otherwise false.

Parameters

context

The context used for the permission check.