Seeking assistance in troubleshooting the email composer plugin for my PhoneGap app (using JQueryMobile).
In my config.xml, I have included the plugin as shown below;
<plugin name="cordova-plugin-email-composer" spec="https://github.com/katzer/cordova-plugin-email-composer.git" >
Additionally, I have JavaScript code that triggers on page load.
The 'Ready' alert appears on the screen, indicating that deviceready is functioning. However, the "email avail" alert following it does not show up.
Further attempts to launch the email through JavaScript yield no results. It seems that resolving the issue with 'cordova.plugins.email.isAvailable' and getting the subsequent alert to display will solve the problem.
Any recommendations on steps I can take to resolve this issue? What could be causing the failure of cordova.plugins.email.isAvailable?
Note: I have referenced cordova.js in the HTML header. Since the app builds and installs correctly otherwise, I don't believe there should be an issue with Cordova... or is there?
document.addEventListener('deviceready', function () {
// cordova.plugins.email is now available
}, false);
alert("Ready");
cordova.plugins.email.isAvailable(
function (isAvailable) {
//alert('Service is not available') unless isAvailable;
}
);
alert("email avail");
cordova.plugins.email.open({
to: 'jobloggs.gmail.com',
subject: 'Feedback'
});