-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix file & image picking with android apps that has launchMode=singleInstance #1380
Conversation
Bump the minor version instead of the patch version please. |
done |
@miguelpruivo can you take a look on this? we need it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine
Thanks buddy |
Legit! Thanks a lot 👍 ! |
intent = new Intent(Intent.ACTION_GET_CONTENT); | ||
intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this change breaks some older Android versions. For me with this change the file picker doesn't work on Android 9, but reverting this change or setting the intent type depending on Android version (like here) fixes this. I am not sure though which versions should use which intent type and why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems wrapping all intents with createChooser
works with launchMode="singleInstance"
regardless of the version of Android even with the old ACTION_GET_CONTENT
intent type: example. It will probably work with other launch modes too, but according to the description here it may force the system to show an extra activity chooser dialog if there are several possible activities for choosing a file. So perhaps this wrapping should better be somehow limited only to singleInstance
applications.
Hello, sorry I've been away for some period, does this issue still exist? |
I'd also like to know why this pull request just has been closed? |
#1336 works for us, so we have been using https://github.com/muttsu-623/flutter_file_picker But it has issues on Windows, so we had to make https://github.com/cypherstack/flutter_file_picker which is 8.0.3 + muttsu-623's single change: muttsu-623@f0930d9 |
this pr resolves this issue: #1379