Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230047

Error while Opening the File - FileOpener

$
0
0

I tried this in Android 6.0.
Used native/file-opener/

code :

location = "/storage/emulated/0/Android/data/com.jinuxlabs.moviesapp/files/Resume.pdf";
        this.fileOpener.open(location, 'application/pdf')
            .then(function () { return console.log('File is opened'); })
            .catch(function (e) { return console.log('Error openening file', e); });

If i give wrong file name, it shows No files in that name correctly. But if Files are there! But it throws Following Error.

Error openening file Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference

Versions:
Ionic - 2.2.3
Cordova: 6.5.0
Android 6.1.2

Any Idea? why this Error Throws up.


Viewing all articles
Browse latest Browse all 230047

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>