I'm new to developing on the phone, so I'm sorry if this is the obvious answer. This is the last part of my project, the only part that does not work is the plugin.
I get the message "Failed to send email via Android Intent" and get the following error in logcat "Error: Status = 2 Message = Class not found in file: ///android_asset/www/phonegap-1.4.1. Js: 651"
I canโt understand it, I was at it the last day!
I added the plugin to plugin.xml
plugin name = "webintent" value = "com.borismus.webintent.WebIntent"
I have the correct namespace for the WebIntent.java file.
borismus.webintent package;
And I have a webintent.js file specified in my index.html.
Below is the function that uses the plugin. function emailxmlfile () {
var subject = "Sports Code Xml Edit List" + filedate.toDateString(); var body = ""; if(!window.plugins || !window.plugins.webintent){ alert('Unable to find webintent plugin'); }else{ var extras={}; extras[WebIntent.EXTRA_SUBJECT] = subject; extras[WebIntent.EXTRA_TEXT] = body; window.plugins.webintent.startActivity({ action: WebIntent.ACTION_SEND, type: 'text/plain', extras: extras }, function() {}, function(e) {alert('Failed to send email via Android Intent');}); }};
Any help would be greatly appreciated. Thanks
source share