foobnix / LibreraReader

Book Reader for Android
http://librera.mobi
Other
2.91k stars 309 forks source link

No activity found to handle intent #1271

Closed natebragg closed 5 months ago

natebragg commented 5 months ago

When attempting to open a file in Librera from within Termux, I got the following toast (which it truncated due to space):

No activity found to handle intent { act=android.intent.action.VIEW dat=content://com.foobnix.pro.pdf.reader.provider/files/storage/emulated/0/Download/Librera/quest.logcat ...

The termux command I ran was:

~$ termux-open --chooser quest.logcat

I tried this on two platforms, same results.

I also tried choosing a different app in the dialog that popped up when I ran termux-open, which worked fine, so I don't believe this is a Termux issue.

natebragg commented 5 months ago

Of interest is that this seems to be due to the file extension, even though the file only contains ascii text. If I change the name to quest.txt the file opens fine.

foobnix commented 5 months ago

As I see in the logs, termux should be configured to allow external applications to read the content java.lang.IllegalArgumentException: TermuxContentProvider requires allow-external-apps property to be set to true in ~/.termux/termux.properties file.

natebragg commented 5 months ago

As I stated in my comment, this is due to the file extension. I have this property set in Termux. Please set this property in that file, and try an ascii file with the name from my report, quest.logcat, and you should see that it does not open.