Skip to content

Conversation

@daniJimen
Copy link
Contributor

@daniJimen daniJimen commented Nov 12, 2025

This commit refactors the logic for setting MIME types in the ACTION_OPEN_DOCUMENT intent.

Previously, Intent.ACTION_PICK was used for specific image types. This has been removed in favor of consistently using ACTION_OPEN_DOCUMENT.

The handling of EXTRA_MIME_TYPES has been simplified:

This commit refactors the logic for setting MIME types in the `ACTION_OPEN_DOCUMENT` intent.

Previously, `Intent.ACTION_PICK` was used for specific image types. This has been removed in favor of consistently using `ACTION_OPEN_DOCUMENT`.

The handling of `EXTRA_MIME_TYPES` has been simplified:
- If `allowedExtensions` is provided, it's used as the value for `EXTRA_MIME_TYPES`.
- If `allowedExtensions` is null or empty, the primary `type` is used instead.
…ile picking

This change modifies the `startFileExplorer` function to use `Intent.ACTION_GET_CONTENT` instead of `Intent.ACTION_OPEN_DOCUMENT`.

This resolves an issue where `ACTION_OPEN_DOCUMENT`, combined with `Intent.CATEGORY_OPENABLE`, could lead to hangs or crashes when picking files from certain providers like Google Drive, OneDrive, or Dropbox, especially when the files are not available locally on the device. `ACTION_GET_CONTENT` is more suitable for importing a copy of the data.
Copy link
Collaborator

@navaronbracke navaronbracke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also going to need a patch version bump and a changelog entry.

daniJimen and others added 4 commits November 14, 2025 10:52
This commit fixes an issue where file type filtering was not being applied correctly. Now, only files that match the selected MIME types are displayed.

Updates the package version to 10.3.7 and adds the change to the `CHANGELOG.md`.
@vicajilau vicajilau merged commit 33476e1 into miguelpruivo:master Nov 21, 2025
9 checks passed
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.

3 participants