Skip to content

Instantly share code, notes, and snippets.

@iampeter
Created March 29, 2015 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iampeter/30957587b414403de27f to your computer and use it in GitHub Desktop.
Save iampeter/30957587b414403de27f to your computer and use it in GitHub Desktop.
Sending SMS from Cordova without any plugin on Android using Crosswalk

Did you know that using Crosswalk you can send an SMS without any plugin in Cordova for Android?


xwalk.experimental.messaging.sms.send(number, text).then(function (message) {
  console.log("Message sent");

}), function (error) {
  console.log("Error!, Error!");
})


This is because Crosswalk implements the Messaging API, alongside many other great ones.

Just make sure you have these in your AndroidManifest.xml:


<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment