flutter_file_picker
flutter_file_picker copied to clipboard
fix #1335: fix intent flag from ACTION_GET_CONTENT to ACTION_OPEN_DOCUMENT
fix #1335: fix intent flag from ACTION_GET_CONTENT to ACTION_OPEN_DOCUMENT
@miguelpruivo Hi @miguelpruivo , I hope you're doing well! I've created a Pull Request and would love to hear your thoughts and suggestions 😄
Hi, what were the reason behind this change?
Hi, what were the reason behind this change?
My guess would be the FilePickerResult
returned from pickFiles()
being null. At least this is what is happening in my case.
https://github.com/miguelpruivo/flutter_file_picker/issues/1335#issuecomment-1714659456
ping on this
ping on this
@miguelpruivo Is there any problem?
I'm afraid to merge this change because I believe it could introduce breaking changes for a lot of users. I don't see a lot of traction on this issue, and if this was the case (for most) that would mean that a lot of devs would be pinging on this.
On the other hand, I'm not sure if changing to OPEN_DOCUMENT will introduce more issues than solve, because we are actually getting (GET_CONTENT) here to get the raw files, not opening. The OPEN_DOCUMENT is more intended to launch the file, rather than manipulating its data from what I understood.
@miguelpruivo what about making this optional, to use Intent.ACTION_OPEN_DOCUMENT or Intent.ACTION_GET_CONTENT?
This PR seems to introduce changes similar to #1380 so I'll mention it here too: it seems that this change breaks file picker on some older Android versions, at least on Android 9. https://github.com/miguelpruivo/flutter_file_picker/pull/1380#discussion_r1485321475
Dup of #1380.
@miguelpruivo, this doesn't seem to be a duplicate of #1380: #1380 has more changes. Are they consequential?
We have had to use muttsu-623's flutter_file_picker for Android because of this issue, but muttsu-623's fork has Windows issues. So today I forked this and made cypherstack/flutter_file_picker which is your 8.0.3 + muttsu-623's single change: https://github.com/muttsu-623/flutter_file_picker/commit/f0930d9fa79d347b2a0e25a7de4f5a4a88a9a907
This PR should be merged. Does it need changes?