-
Notifications
You must be signed in to change notification settings - Fork 704
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
Permission callbacks called even when not requested #19
Comments
I'm running into this issue as well in the same scenario and as a result am unable to use the plugin. |
From the exception itself it seems that your system can't find any app that can handle the file picking which is expected, since it's launching the @rrarey02 @ened would you mind to add the plugin to your project using
If so, some logs would be appreciated so I can fix it ASAP. I can't seem to replicate the issue which makes the task harder. Any PR will also be welcome if you manage to fix it yourself. |
@miguelpruivo thank you for the quick fix. I can confirm the issue is resolved in beta. Test was done on an actual device as before. |
I’m glad it solved. Still, I’m not quite sure about what was causing the issue @ened. It was a blind hit and only changed the request code to use the class hashCode instead of static 0 as you suggested. But I can’t relate it to the stacktrace you’ve posted here. @rrarey02 let me know if it’s also working for you before I close the issue. Thank you. |
@miguelpruivo, I just applied the fix and it is working great in Android Studio's emulator. Haven't tried in a device yet but I'll take @ened's word for it. Thank you so much! |
has same issue at 1.0.3. |
Closing issue. Version 1.1.0 released. See changelog |
My App needs a few permissions to work, like Location or "ReadExternalStorage".
I will use the simple_permissions plugin to gather the location permission.
However, once that permission is granted, the
file_picker
callback at https://github.com/miguelpruivo/plugins_flutter_file_picker/blob/e496cfc060d724b1da46f295e4085cb9748448d3/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java#L99 will be called as well. This causes a crash:From my point of view, the plugin should not rely on a static request code of zero (which may be used by other plugins, indeed) but perhaps a
.hashCode()
number based on the plugin name.The text was updated successfully, but these errors were encountered: