79352770

Date: 2025-01-13 16:05:17
Score: 1
Natty:
Report link

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.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Usman Khan