Open simpixelated opened 9 years ago
I have the same issue - I'm assuming that it's a permission issue - the file is being downloaded to your app's data directory, which is not readable by other apps due to Android's sandboxing.
Yes this is typically due to permissions. I moved due to a family emergency and my time is fairly limited so I have not had a chance to dive into this, apologies.
On Mon, Oct 19, 2015 at 9:31 AM, TipsTrade Ltd. notifications@github.com wrote:
I have the same issue - I'm assuming that it's a permission issue - the file is being downloaded to your app's data directory, which is not readable by other apps due to Android's sandboxing.
— Reply to this email directly or view it on GitHub https://github.com/disusered/cordova-open/issues/37#issuecomment-149272289 .
Carlos
It should be possible to implement this on the native side using FileProvider as cordova-plugin-x-socialsharing does.
Using version 10.4-1.0.9, I'm not able to open files on Android (5.0.1). It does trigger the intent screen, so I know that part is working. But after I select an app, it can't open the file. For PDFs I get a system message that says "Cannot display PDF (filename.pdf cannot be opened)". For images it opens in the app I chose but just shows a blank space or "Media not found.". Here's my code:
However when I call
window.open
with the sameentry.toURL()
, it does work, so I know the file exists and can be viewed. Here's an example URL:file:///data/data/com.homdna.HomDNA/files/appraisal.jpg
. I've tried using fileOpener2 as well, with the same results. So I think it likely is a problem with Android, Cordova, or my own code.