Skip to content

Allow app to function partially without All Files access on Android 10+ #9343

@AlvaroBrey

Description

@AlvaroBrey

On #9327, users are upset that All Files access is now required on Android 10+ devices. We should be able to make the app work without this access, although with limited functionality.

User perspectives

We have the clashing needs of

  • Users who want to upload files that normal apps can't access (such as other apps' data. a common one is Whatsapp backups). These users need All Files permission.
  • Users who don't want to grant Nextcloud access to their data. These users need the app to function without storage access.
  • Finally, less savvy users may just want to upload photos and videos (media collections). This should still work with scoped storage (only READ_EXTERNAL_STORAGE).

Possible solutions

Option A

Implement logic to detect that the permission has been denied and not ask for it again on app startup. BUT, we should always ask for the permission again if the user attempts to do something that requires it (setup auto-upload, select files for upload...)

With this option, uploads will be almost completely non-functional without the permission. Browsing server content and downloading/sharing files should still work.

Option B

  • Use READ_EXTERNAL_STORAGE so that scoped storage provides access to at least some of the data on external storage
  • Allow users to request this permission the first time they try to upload files or setup autoupload (or other access-sensitive tasks)
  • Add a shortcut in Settings/Extra to request the All Files permission later, if the user so desires.

With this option, users would get a choice to let Nextcloud access only media files or all files. It gives the users more choice but is also a bit more confusing (and harder to implement).

This option could also be implemented AFTER option A (first let the app work without uploads, and later get the app to work with the reduced, media-only access).

Technical context:

Since November, all apps must abide by the new storage rules in Android 10+. These rules mostly consist of:

  • The old "access external storage read-write" permission is no longer available.
  • The old "READ_EXTERNAL_STORAGE" permission now only allows access to media collections (mostly photos and videos).
  • There is a new "All files" permission, that requires approval by Google and allows similar access to what we had before. This is what we're currently using.
    • Additionally we require this permission for the app to work now. It isn't optional, as some stuff was broken without it.
  • The new "All files" permission grant UX is scarier for the user. They get taken to a system dialog where they have to manually flip a switch and read that Nextcloud will have access to all data. This is an intentional privacy-aware change on Google's part.
  • Downloads to our private storage should still function without All Files access.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions