Repository navigation
fix(file_picker_android): remove Apache Tika dependency for MIME type detection - #2105
Merged
navaronbracke merged 2 commits intoJul 31, 2026
Conversation
… detection Tika added ~300 KB to the Android binary just to detect a MIME type in saveFile(). MIME types are now resolved from the file name extension via MimeTypeMap, with URLConnection.guessContentTypeFromStream as a content-sniffing fallback when no usable extension is available. Fixes vicajilau#2101
navaronbracke
approved these changes
Jul 31, 2026
| name: file_picker_android | ||
| description: Android implementation of the file_picker plugin. | ||
| version: 1.0.0 | ||
| version: 1.0.1 |
Collaborator
There was a problem hiding this comment.
This should be reverted, file_picked_android is not yet published iirc (Although there is a different naming issue that we need to look at, apparently there's a naming conflict with the plugin name)
| @@ -1,3 +1,7 @@ | |||
| ## 1.0.1 | |||
|
|
|||
| - Removed the Apache Tika dependency (~300 KB) used for MIME type detection in `saveFile()`. MIME types are now resolved from the file name extension via `MimeTypeMap`, with `URLConnection.guessContentTypeFromStream` as a content-sniffing fallback when no extension is available. [#2101](https://github.com/miguelpruivo/flutter_file_picker/issues/2101) | |||
Collaborator
There was a problem hiding this comment.
This should be moved under 1.0.0
- Revert the version bump: file_picker_android hasn't been published yet, so there's no prior release to patch against. - Fold the CHANGELOG entry into the existing 1.0.0 heading instead of a new 1.0.1 section. - Drop stale Tika references from doc comments, same as the companion android/ fix.
navaronbracke
approved these changes
Jul 31, 2026
Collaborator
|
@ryanaidilp Feel free to open a pull request that we can hotfix to v11.x now :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
file_picker_androidpackage, used only to detect a MIME type forsaveFile().MimeTypeMap(with the existing CSV special-case preserved), falling back toURLConnection.guessContentTypeFromStreamcontent sniffing only when the file name has no usable extension.tika-coredependency frombuild.gradle.kts.file_picker_androidto1.0.1with a CHANGELOG entry.This is the
file_picker_android-specific PR requested in #2101, as a companion to:android/implementation onmaster.11.0.xline (based onv11.0.2).Fixes #2101
Test plan
android/implementation (same imports, same dependency versions).