I'm using this plugin in the Ionic 1 and Cordova.
But when I try open a file PDF, show me error below:
var extension = $mmFS.getFileExtension(path),
mimetype = $mmFS.getMimeType(extension);
console.log('Extension', extension, 'Mimetype', mimetype);
if (ionic.Platform.isAndroid() && window.plugins.webintent) {
var iParams = {
action: "android.intent.action.VIEW",
url: path,
type: mimetype
};
window.plugins.webintent.startActivity(
iParams,
function() {
$log.debug('Intent launched');
deferred.resolve();
},
function(err) {
$log.debug('Intent launching failed.');
$log.debug('action: ' + iParams.action);
$log.debug('url: ' + iParams.url);
$log.debug('type: ' + iParams.type);
console.log('ERR: ' + err);
}
)
}
I'm using this plugin in the Ionic 1 and Cordova.
But when I try open a file PDF, show me error below:
What I'm doing wrong?