orgzly-revived / orgzly-android-revived

Outliner for taking notes and managing to-do lists
https://www.orgzlyrevived.com
GNU General Public License v3.0
673 stars 42 forks source link

Add support for links to files (pdf, html, etc) #94

Open xarath opened 1 year ago

xarath commented 1 year ago

It would be great to be able to open links to different document types from Notebooks. Pdf and html documents comes to mind.

sp1r1t commented 11 months 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.

enisozgen commented 11 months ago

Here is my 3 test cases I couldn't achieve to open pdf file

agguser commented 3 weeks ago

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.