cordova-plugin-file-opener2: Error while Opening the File

I tried this in Android 6.0. Used this Plugin Using Ionic Native

code :

location = "/storage/emulated/0/Android/data/com.jinuxlabs.moviesapp/files/Resume.pdf";
        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.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (20 by maintainers)

Most upvoted comments

Just tested it with your new version, all is well.