DEV Community

David D
David D

Posted on

I got tired of the official docs, so I wrote a plain-English guide to surviving Scoped Storage and the READ_EXTERNAL_STORAGE deprecation (2026).

Hey everyone,

I’ve been migrating some older legacy codebases recently, and honestly, trying to piece together Google's official documentation on Scoped Storage, especially with the Android 13/14 granular permissions, gave me a headache.

I wrote down a cheat sheet to standardize how I handle files now, and thought it might save some of you a few hours of debugging.

Here is the TL;DR on the modern rules:

  1. READ_EXTERNAL_STORAGE is dead. For API 33+, you have to use granular permissions (READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, READ_MEDIA_AUDIO).
  2. Go "Zero Permission" if you can. If you just need a user to pick a profile picture, don't ask for manifest permissions. Just use the PhotoPicker (ActivityResultContracts.PickVisualMedia).
  3. Stop trying to put non-media files in the MediaStore. Use Context.getExternalFilesDir() for hidden app data, and the Storage Access Framework (SAF) for user-facing documents like PDFs.
  4. Don't forget API 34's READ_MEDIA_VISUAL_USER_SELECTED. You have to handle partial media access gracefully now without looping permission prompts.

I wrote a much deeper dive into the architecture, including how to fix Environment.getExternalStorageDirectory() crashes, on my technical blog.

If you want the full breakdown, you can read it here: Android Studio Scoped Storage

Hope this helps someone avoid the SecurityExceptions I had to deal with!

Top comments (0)