-
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 Requesting reason #872
Comments
To handle files in the Flutter side you always need to work with absolute paths to create a Because of that, I'm afraid that you will always need to request read permissions. |
You can still use native code to create a temporary file with the same data, without having to request access to the entire external storage. As someone who uses this plugin in a very simple app, having the user see the |
Does using 4.2.2 solve it for you? That version removed the read external permission from the plugin but then reverted. |
@miguelpruivo It removed the permission declaration in the manifest, but that doesn't remove the native code requesting the permission |
Oh, I got you. As an alternative I can refactor to add a |
I don't think this plugin should handle permissions at all. It's the developer's responsibility, not the plugin's. If the application crashes or sends an error message, then the developer would know what to do, instead of adding extra responsibility to a plugin |
@dovahkiin98 I understand your point but most will need this permission anyway, I can see it being in a separate method just to provide a way to ask for the permission, however, I'm quite afraid that I'm starting to receive a lot of new issues just because people won't read the changelog/docs. But I agree with you nevertheless, I'll probably refactor it into a separate method. |
Hey @miguelpruivo , I commented out the code related to the detection permissions, and the plugin still works fine. I am not sure why we need to check the permission? |
I think that some Android versions don't require permissions and others require. I'm not sure which is which right now, I'd have to look into the docs. |
You shouldn't need READ_EXTERNAL_STORAGE permissions to cache the file. Is there a reason why you can't use the app-specific directories that don't require any permissions to cache the file? https://developer.android.com/training/data-storage/app-specific#internal-access-files The image_picker Flutter package does the same thing as this package (except that you can only browse for images) without requiring READ_EXTERNAL_STORAGE. |
Do you have plan to remvoe |
Do you have any update this issue @miguelpruivo |
@miguelpruivo |
Hi, feel free to issue a PR if you're in a rush as I've been quite busy lately. I'd review it ASAP. |
Why does the plugin request permission to External Storage? Even though reading a file or picking a folder does not require External Storage permission.
For example, in Android, picking a file gives you a URI, that you can use to read data from, without needing permission.
Same for writing to file if you pick a directory, though you do need more code to do that.
If the user of this plugin wants to write to the file, and that permission is denied, that's the developer's responsibility, not the Plugin's.
The text was updated successfully, but these errors were encountered: