Skip to content
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

Refrain from insisting for full storage access #966

Open
KaKi87 opened this issue Jan 5, 2023 · 2 comments
Open

Refrain from insisting for full storage access #966

KaKi87 opened this issue Jan 5, 2023 · 2 comments
Assignees
Labels
optimization The existing product or functionality is improved

Comments

@KaKi87
Copy link

KaKi87 commented Jan 5, 2023

Note: Please write your issue only in english

Is your feature request related to a problem? Please describe.
kDrive requests full storage access at every start while it may not be necessary, e.g. for people who don't use automated backup but only upload files once in a while, which works fine with Storage Access Framework.

Describe the solution you'd like
The app could stop insisting to get full storage access at every start and instead only ask when the user tries to enable features that actually require it.

Describe alternatives you've considered
For non-root users, the only option is, at every start, to click the button that redirects to permission settings, then go back, so that the non-dismissible modal leaves the user alone.
For root users, another option is to install App Ops and set storage permissions to Ignore.

Additional context
None


Thanks

@JorisBodin
Copy link
Member

It is needed in several places in the application.

  • Synchronization of photos/videos
  • Offline file
  • Downloading a file
  • Upload a file
  • Take a photo/video

And I may have forgotten some others.

When you talk about "Storage Access Framework" you want to talk about this action intent?
We had to change from ACTION_OPEN_DOCUMENT to ACTION_GET_CONTENT, because we had problems with the access rights to the file expiring while the file had still not been uploaded.
Look: https://github.com/Infomaniak/android-kDrive/pull/849/files#diff-85519be325702a51ecf2c14b88fd1da1a4304341861e005e0c17fda3ce884200

We had thought about asking for it every time it was really necessary, but it generated a lot of complexity in the code. Knowing that it's a 100% open-source application, it's easy to see that this permission is used ethically when granted, especially since it covers the majority of the app's use cases.
If you have an idea to implement it simply by taking into consideration all the use cases (and they are considerable) without breaking the app's workflow, with very pleasure.
This is where we make the request:

if (requestPermission) registerForActivityResult.launch(permissions)

@JorisBodin JorisBodin added the optimization The existing product or functionality is improved label Jan 6, 2023
@KaKi87
Copy link
Author

KaKi87 commented Jan 6, 2023

Offline file
Downloading a file
Upload a file

I can definitely do those although I didn't grant the Files and media permission, which makes sense, since offline files are downloaded at /Android/media/com.infomaniak.drive, and download/upload works with SAF.

Take a photo/video

I can't test this as the app says I don't have any app to work with.
Well, the only camera app I have is a custom GCam.

Knowing that it's a 100% open-source application, it's easy to see that this permission is used ethically when granted, especially since it covers the majority of the app's use cases.

I can't argue with that, especially since the app is on F-Droid, which I was pleasantly surprised to find out, considering it's a big tech app.

But, using permissions only when necessary, is still more elegant and more secure, however small the difference may be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization The existing product or functionality is improved
Projects
None yet
Development

No branches or pull requests

3 participants