I am looking to create an app using Phonegap with the Adobe Phonegap Builder on . Specifically, I want to utilize the Plugin for sending SMS messages.
In my config.xml file, I have added:
<gap:plugin name="com.cordova.plugins.sms" version="0.1.2" />
The Adobe PhoneGap Builder recognizes this plugin as integrated.
Next, I downloaded and included /www/sms.js from https://github.com/cordova-sms/cordova-sms-plugin/tree/48d9630 and linked it in the index.html
I then created a JavaScript function similar to the one provided on Git:
var message = "Testing SMS by sending it to ";
var options = {
replaceLineBreaks: false,
android: {
intent: 'INTENT'
}
};
var success = function () {
alert('Message sent successfully');
};
var error = function (e) {
alert('Message Failed:' + e);
};
sms.send("MY Handy number", "sms", options, success, error);
I came across a suggestion in another post to replace
var exec = require('cordova/exec');
with
var exec = cordova.exec
However, this did not resolve the issue.