The documentation says \"Callers can set a document URI through EXTRA_INITIAL_URI to indicate the initial location of documents navigator.\"
But it won
From DocumentsContract.EXTRA_INITIAL_URI:
Location should specify a document URI or a tree URI with document ID. If this URI identifies a non-directory, document navigator will attempt to use the parent of the document as the initial location.
As far as I'm aware
Uri.fromFile, it needs to originate from a DocumentsProviderAssuming uri was retrieved from Intent.ACTION_OPEN_DOCUMENT_TREE:
DocumentFile file = DocumentFile.fromTreeUri(context, uri);
intent.putExtra(EXTRA_INITIAL_URI, file.getUri());