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.