Skip to content

Instantly share code, notes, and snippets.

@rjcorwin
Created April 8, 2020 12:58
Show Gist options
  • Save rjcorwin/1bc2aead9e46846fa77319ca4df948e5 to your computer and use it in GitHub Desktop.
Save rjcorwin/1bc2aead9e46846fa77319ca4df948e5 to your computer and use it in GitHub Desktop.
var message = 'Hello world'
var number = '555-555-5555'
var options = {
replaceLineBreaks: false, // true to replace \n by a new line, false by default
android: {
intent: 'INTENT' // send SMS with the native android SMS messaging
//intent: '' // send SMS without opening any other app
}
};
var success = function () { alert('Message sent successfully'); };
var error = function (e) { alert('Message Failed:' + e); };
sms.send(number, message, options, success, error);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment