WRITE_EXTERNAL_STORAGE is deprecated for Android 11+ (API 30+). If you want to access the storage then use scoped storage, for sepcific use cases you can follow: • For app-specific files: context.getExternalFilesDir(). • For shared media: Use MediaStore. • For file picking: Use Storage Access Framework (SAF) with Intent.ACTION_OPEN_DOCUMENT.
Add runtime permissions for READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, or READ_MEDIA_AUDIO for API 33+.
Avoid android:requestLegacyExternalStorage unless targeting API < 30.