This question is locked. New answers and comments are not allowed.
I'm using WebIntent (https://github.com/phonegap/phonegap-plugins/tree/master/Android/WebIntent/) as a custom plugin on my Icenium project.
I am using the startActivity method to have the Android OS recommend an viewer for a file of a particular mime type.
window.plugins.webintent.startActivity({
url: fullpath, // this is a local file
action: window.plugins.webintent.ACTION_VIEW,
type: 'application/pdf'
},
function(args) {
console.log('success!');
},
function(args) {
console.log(JSON.stringify(args));
});
This is working correctly.
However, if I set a type to 'application/someunsupportedmimetype', I am expecting an error to be reported because webIntent should not be able to find an appropriate viewer to recommend. Instead, Icenium Ion closes on the device and no errors are outputted to the console within Icenium Graphite. I have also attempted to wrap everything in a try/catch block - the same results occur.
Thoughts?
I am using the startActivity method to have the Android OS recommend an viewer for a file of a particular mime type.
window.plugins.webintent.startActivity({
url: fullpath, // this is a local file
action: window.plugins.webintent.ACTION_VIEW,
type: 'application/pdf'
},
function(args) {
console.log('success!');
},
function(args) {
console.log(JSON.stringify(args));
});
This is working correctly.
However, if I set a type to 'application/someunsupportedmimetype', I am expecting an error to be reported because webIntent should not be able to find an appropriate viewer to recommend. Instead, Icenium Ion closes on the device and no errors are outputted to the console within Icenium Graphite. I have also attempted to wrap everything in a try/catch block - the same results occur.
Thoughts?