cryptomator / cryptomator/android
File Selection Fails on MIUI & Some Android Flavors --> Implement in-app file browser
- Dominant language
- Kotlin
- Stars
- 1.2k
- Forks
- 216
- PR merge metrics
- No merged PRs in 30d
Description
### Please agree to the following
- [X] I have searched [existing issues](https://github.com/cryptomator/android/issues?q=) for duplicates
- [X] I agree to follow this project's [Code of Conduct](https://github.com/cryptomator/android/blob/develop/.github/CODE_OF_CONDUCT.md)
### Summary
File Selection Fails on Many Android Versions --> Implement an in-app file browser
### System Setup
```markdown
- Android: [Version shown in the settings of Android"]
- Cryptomator: [Version shown in the settings of Cryptomator]
- …
Many recent Android Versions including latest MIUI.
```
### Cloud Type
_No response_
### Steps to Reproduce
Adding Any File(s) Simply Fails.
It goes to files selection and you can click one or multi files and click Select button.
It goes back to app.
But nothing happens.
App permission is only one and it's granted: Files and Media. Remove if not used is disabled too.
### Expected Behavior
Should process file(s) after getting back to app.
### Actual Behavior
But nothing is processed after files selection goes back to cryptomator.
### Reproducibility
Always
### Relevant Log Output
_No response_
### Anything else?
This is a well known with many apps.
It's security feature in many latest versions.
Including many recent MIUI which is Xiaomi Android OS flavor.
Xiaomi is probably biggest Android device seller in the world.
This restriction, disabling many apps file Selection, applies to other phone brands too. Probably affects about half Android phones & tablets. So it's an urgent problem. I think over 50% of phones will have this big within this year.
SOLUTION:
A few apps use a fix.
For example Tivimate app which is used as a video streaming client.
In file selections dialog box (you can have 2nd option in drop-down menu), next to usual file Selection button another option is:
SYSTEM PICKER for files selection
This is different to the default file Selection launched by apps IDE coders processes. It launchers the OS flavor's own system file picker.
These security restrictions won't go away. They're getting stricter and adopted by ever growing versions of Android by big phone makers. Because all others are following Xiaomi and Samsung in doing this.
All app makers are facing this issue. Many are not functioning as a result. Some do temporary workarounds for latest security restrictions.
But the file SYSTEM PICKER is guaranteed to work and not break with latest Android OS updates by makers, or security patch updates.
So currently many can't add files to vaults in Cryptomator. It's simply not working on adding files to either local storage or cloud platforms.
After choosing a folder with System Picker, a security dialog box in many new Android Versions asks to: DENY or ALLOW, this permission.
This allows file operations in that folder.
Selecting one or more files is another step.
Some Android Versions only ask this permission ONCE for an app, often it's asked Everytime.
Some Android flavors allow granting file access to an app for the root (root of internal storage or SD_Card). Some flavors don't grant this for whole root (all folders). You have to select a folder (in root or deeper subfolders), then file picking is allowed for that folder or subfolder only.
Boxcryptor app file Selection is currently working on MIUI without System Picker. Many other apps stop working regularly but are updated to work, this is a lot of ongoing work by many devs. System Picker as by Tivimate and a few others seem to fix this ongoing problem permanently regardless of whatever every new security patch or Android update by makers. Otherwise lots of work and keeping tabs on many Android flavors.
Thanks.
Contributor guide
Assessment
This issue has not been assessed yet.