ti8m / DocumentHandler

A phonegap plugin to handle documents (f.e. PDFs) loaded from a URL.
MIT License
30 stars 70 forks source link

on Android, DocumentHandler fails when URI is pointing to file in persistent storage #10

Open jbenson77 opened 9 years ago

jbenson77 commented 9 years ago

I'm trying to use this code: handleDocumentWithURL( function() {console.log('success');}, function(error) { console.log('failure'); if(error == 53) { console.log('No app that handles this file type.'); } }, 'file:///data/data/com.highbrookcreate.wf3/files/files/my_downloads/sobrite.pdf' );

The URI 'file:///data/data/com.highbrookcreate.wf3/files/files/my_downloads/sobrite.pdf' is valid and verified. But when I try to run this my app crashes with "Unfortunately, has stopped"

If I replace the URI with "http://www.highbrookcreate.com/workingfires/sobrite.pdf" everything works great.

On iOS if my URI is 'cdvfile://localhost/persistent/PDFS/sobrite.pdf' everything also works.