Join Slack
Powered by
<Why does DocumentsContract.getTreeDocumentId retu...
# stackoverflow
u
user
03/21/2021, 4:21 AM
Why does DocumentsContract.getTreeDocumentId return the top level document ID?
Using android studio 4.1.3 purely in kotlin I'm attempting to read in all files from a directory at a URI returned to by an ACTION_OPEN_DOCUMENT_TREE activity. The URI itself points to the correct location, and calling externalLocUri.toString() yields
content://com.android.externalstorage.documents/tree/primary:Documents/Test
The issue is that when calling DocumentsContract.getTreeDocumentId(externalLocUri) the string that is returned is just primary:Documents This causes...
Open in Slack
Previous
Next