Open xarath opened 1 year ago
This is partly possible already. At least the an intent with a correct MIME type is set and a activity is started when clicking on a link (like [[file:test.pdf][The pdf for testing]]).
The problem I'm facing though, is that the app that is opening the file doesn't have read permissions on it. I have no problem opening the same file from a file browser app.
I assume there is a bug in the way Orgzly passes the file path.
Here is my 3 test cases I couldn't achieve to open pdf file
Works for txt or png!!!!
Does not works for pdf
When clicking a file link file:/storage/emulated/0/f.txt
in Orgzly Revived, the text editor app (NMM Text) cannot open the file, saying "Error: open failed: EACCES (Permission denied)", and recent file is content://com.orgzlyrevived.fileprovider/external-path-current/f.txt
. This is unlike clicking the file in a file manager, which open the file in the text editor successfully, and recent file is /storage/emulated/0/f.txt
.
Note that when clicking an image file link, the image viewer app shows the file content correctly, but does not know the file path, so it cannot, for example, delete the image file. This is unlike clicking the file in a file manager.
It would be great to be able to open links to different document types from Notebooks. Pdf and html documents comes to mind.