ACTION OPEN DOCUMENT TREE only returns empty Recent folder ACTION OPEN DOCUMENT TREE only returns empty Recent folder android android

ACTION OPEN DOCUMENT TREE only returns empty Recent folder


Others mentioned the option on DocumentsUI which the user should manually enable. However there is another option. Add these extras on to your ACTION_OPEN_DOCUMENT, ACTION_GET_CONTENT ,ACTION_CREATE_DOCUMENT or ACTION_OPEN_DOCUMENT_TREE intent. Explore button on Storage settings uses these extras while opening DocumentsUI app. I think the first one is enough to show Internal storage and sdcard. The others are good to have.

intent.putExtra("android.content.extra.SHOW_ADVANCED", true);intent.putExtra("android.content.extra.FANCY", true);intent.putExtra("android.content.extra.SHOW_FILESIZE", true);

Android 10

I tried on Android 10 emulator and OnePlus 7T, "SHOW_ADVANCED" extra does not do anything. User should manually click to "Show Internal storage" on the three dot menu. SDCards are visible by default.


I had the same problem as you do.

I clicked "Show internal storage" in the overflow menu

enter image description here

After that I was able to see "Internal storage" in the drawer

enter image description here


Not sure if this is what you're asking but in the folder picker, where you're seeing only the recent folder, there's a overflow menu where you can toggle between show/hide SD Card.

Overflow menu