syncthing-android: Opening txt files from "Recent changes" view does not work

Description of the issue

Tapping on an item from “Recent changes” view is expected to open corresponding file in relevant app. But this almost does not work for txt files. Most of the apps can not recognize sent intent. For instance https://github.com/gsantner/markor can not open files from such intents.

I’ve tried to compare intents that sends Syncthing-Fork with intents of file managers that properly opens text files in all available text editors. https://github.com/MuntashirAkon/AppManager

Synthing-Fork:

Data: /storage/emulated/0/Notes/todo.txt#Intent;type=text/plain;launchFlags=0x3000001;component=io.github.muntashirakon.AppManager/.intercept.ActivityInterceptor;end URI: /storage/emulated/0/Notes/todo.txt#Intent;type=text/plain;launchFlags=0x3000001;component=io.github.muntashirakon.AppManager/.intercept.ActivityInterceptor;end

Another app:

Data: content://com.simplemobiletools.filemanager.pro.provider/external_files/storage/emulated/0/Notes/todo.txt URI: intent://com.simplemobiletools.filemanager.pro.provider/external_files/storage/emulated/0/Notes/todo.txt#Intent;scheme=content;type=text/plain;launchFlags=0x3000001;S.real_file_path_2=%2Fstorage%2Femulated%2F0%2FNotes%2Ftodo.txt;end

There is conspicuous difference. I am not familiar with Android ways but it seems to me that Data and URI most likely should not be identical.

Reproduction Steps

See above.

Version Information

  • App Version: 1.16.0.6
  • Syncthing Version: v1.16.0
  • Android Version: Android x.y
  • Device manufacturer: Xiaomi
  • Device model: Mi A1

Device platform info

Not collected, I believe irrelevant

Android Log

Not collected, I believe irrelevant

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (12 by maintainers)

Most upvoted comments

I’ve tested F-Droid build v 1.18.0 and txt files opens as expected.

Thank you!