-
Notifications
You must be signed in to change notification settings - Fork 35
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
Disable storage permission request #37
Comments
The reason I've added the storage permission is I have the setSavePath function on controller which allow programmer to put custom path for their images. So the solution I can give for this problem is, at the latest version (> 1.3.1), I've added |
Thanks a lot! |
Hi, I cannot re-open this issue, but I found a problem with the implementation. If |
Hi, thanks, i will check it later!
…On Fri, Jan 8, 2021 at 5:51 PM Steven Motta ***@***.***> wrote:
Hi, I cannot re-open this issue, but I found a problem with the
implementation. If checkPermissionAtStartup is true then hasPermission
can never be true and so the camera cannot be loaded. Even if
hasPermission is public it cannot be accessed since the state is private.
I have made a pull request (871a2e0
<871a2e0>)
to address this issue, feel free to merge it to master or edit it if
necessary.
I tested the changes and work in the latest Flutter version.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIBAC6PDIIHKDSTWI5UNIN3SY3PR3ANCNFSM4RYOMN3Q>
.
|
The problem I found out with my app is in these lines in 'checkForPermission' method in AdvCameraPlugin.java:
Dexter.withActivity(activity) .withPermissions(Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE)
I suggest that better approach would be this:
Dexter.withActivity(activity) .withPermissions(Manifest.permission.CAMERA)
Or rather, not requesting storage permission. Here is my reasoning and my personal case:
I implemented a dialog which explain the usage of storage in my app, which is showed before the system dialog of storage permission. The problem is that storage permission for AdvCamera is asked on initialization, so a possible solution is to first show the dialog, then initializate the widget. The problem with this is that storage is not necessary for camera since in a case of permission denial the image could be temporarly saved in a path where storage permission is not required (i.e. Directory.systemTemp), since in my case the image is only used for further processing and upload. But as I checked in the AdvCamera widget, this widget is only initialitied when permissions are successful, which in my case is not good since I would like my users to still take photos even if they don't concede storage permission, if they do the image is just permantly storaged.
So to conclude, for me a better approach would be not to ask storage permissions in both iOS (in this case I didn't check the code) and Android, and leave the duty to ask permissions to the developer with a package like permission_handler (if they need it), or simply just adding an option to disable it in the package.
Thank you and best regards.
The text was updated successfully, but these errors were encountered: