ToxAndroidRefImpl icon indicating copy to clipboard operation
ToxAndroidRefImpl copied to clipboard

[BUG] Opening files (videos) from file transfers / scoped storage

Open 0xlne opened this issue 2 years ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Send file to peer
  2. Click on export file
  3. Toast received that the file has been exported
  4. 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.

0xlne avatar Jun 25 '22 20:06 0xlne

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

zoff99 avatar Jul 03 '22 20:07 zoff99

also the newest version of TRIfA will allow you to open the exported file directly from the Messageview

zoff99 avatar Aug 31 '22 07:08 zoff99