private void selectFolderInternal(final SelectAction action, final PersistableFolder folder, final Uri startUri, final CopyChoice copyChoice) {

        // call for document tree dialog
        final Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION |
                (folder == null || folder.needsWrite() ? Intent.FLAG_GRANT_WRITE_URI_PERMISSION : 0) |
                (folder != null ? Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION : 0));
        Uri realStartUri = startUri != null ? startUri : (folder != null ? folder.getUri() : null);

        // show internal storage
        intent.putExtra(Intents.EXTRA_SHOW_ADVANCED, true);

        if (realStartUri != null && android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            if (UriUtils.isFileUri(realStartUri)) {
                realStartUri = UriUtils.getPseudoTreeUriForFileUri(realStartUri);
            }
            // Field is only supported starting with SDK26
            intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, realStartUri);
        }

        runningIntentData = new IntentData(folder, copyChoice, action);
        startActivityForResult(intent, action.requestCode);
    }
You MUST include in {@link Activity#onActivityResult(int, int, Intent)} of using Activity
main/src/main/java/cgeo/geocaching/storage/ContentStorageActivityHelper.java