Error while Opening the File - FileOpener


#1

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.