Skip to content

Document initialDirectory limitation for picking on Android - #2219

Closed
vicajilau wants to merge 1 commit into
mainfrom
docs/android-initial-directory-limitation
Closed

vicajilau wants to merge 1 commit into
mainfrom
docs/android-initial-directory-limitation

Conversation

@vicajilau

Copy link
Copy Markdown
Owner

Summary

  • Follow up from the review discussion on Forward initialDirectory and dialogTitle to native on Darwin #2218: Android has a similar looking gap to the Darwin one fixed there, but it goes deeper.
  • The native Kotlin side never sets DocumentsContract.EXTRA_INITIAL_URI for ACTION_OPEN_DOCUMENT, ACTION_OPEN_DOCUMENT_TREE, or the ACTION_GET_CONTENT variants, so initialDirectory has no effect on pickFile(), pickFiles(), pickFileAndDirectoryPaths(), or getDirectoryPath(). Only saveFile() honors it today.
  • Making it work for picking needs native support for turning a plain path into a SAF document tree URI, which isn't a direct mapping, so it's documented as a known limitation for now rather than fixed in this PR.

No code changes, documentation only.

The native side never sets DocumentsContract.EXTRA_INITIAL_URI for ACTION_OPEN_DOCUMENT, ACTION_OPEN_DOCUMENT_TREE, or ACTION_GET_CONTENT, only saveFile honors initialDirectory today. Making it work for picking needs native support to turn a plain path into a SAF document tree URI, tracked as a future improvement rather than fixed here.
@vicajilau

Copy link
Copy Markdown
Owner Author

Wrong target, moved this commit onto #2218 instead.

@vicajilau vicajilau closed this Sep 21, 2026
@vicajilau
vicajilau deleted the docs/android-initial-directory-limitation branch September 21, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant