ToxAndroidRefImpl
ToxAndroidRefImpl copied to clipboard
[BUG] Opening files (videos) from file transfers / scoped storage
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Send file to peer
- Click on export file
- Toast received that the file has been exported
- File inaccessible to apps other than Trifa; video files unplayable (not found by other apps like VLC).
Expected behavior Files accessible for other apps like video players, PDF readers, file managers etc.
Your system information:
- TRIfA Version: 1.0.157
- App from Google-Play / F-Droid / Github-Releases / other: F-Droid
- Android OS Version: Android 11
- Device: Nubia RedMagic 6, Samsung Galaxy Note 10+
Add screenshots, if possible
Additional context I presume the error is due to scoped storage being enforced from Android 11 onwards, meaning /sdcard/Android/data/xxx is only accessible to the app (uid/gid) that owns/created the folder, even for reading. A quick & dirty workaround would be an option/toggle/radio button in settings, to select the file export strategy, much like OsmAnd, which gives you a list of possible locations. Example: 1: the current one, for whatever reason: /sdcard/Android/data/com.zoffcc.applications.trifa or 2: /sdcard/Downloads/ (with a warning of lack of security).
I saw that #230 was raised to submit a similar issue, which became more apparent since that time, due to more users being on Android 11/12.
the files are accessible to filemanagers. sadly most phones come with filemanagers pre-installed that are broken. if you install https://f-droid.org/en/packages/com.simplemobiletools.filemanager.pro/ it will ask for access and allow you to read /sdcard/Android/data/ directory
also the newest version of TRIfA will allow you to open the exported file directly from the Messageview