How to send SMS without opening SMS native android app


Hi All,

I have used the plugin to send SMS through ionic android app. The problem is that it opens the native android SMS messaging app to send it. I want that my app sends SMS without opening any other app.


var intent = ‘’; //leave empty for sending sms using default intent


Hi sorry I did not get you :frowning:
Why is intent even used?


In the Javascipt when:
var intent =‘INTENT’ > native android SMS messaging
var intent = ‘’ > send SMS without open any other app

$window.sms.send(number, message, intent, success, error);


Thanks for this - the documentation on the plugin is lacking the explanation for the ‘intent’ parameter - this make sense, so thanks for clarifying.


Hi Jimibi,

Thanks alot man!


I will edit the documentation of this plugin.


Hi! I am trying to use the sms plugin, but it’s not working. Do you mind offering some help?

I followed everything on github and put the two pieces of code in the following spots: the HTML went into my view, and the JAVASCRIPT went into my app.js ionic file after this line: “$urlRouterProvider.otherwise(’/tab/home’);”.

Nothing seems to be working. I also went onto github and cloned the cordova-sms-plugin-test, which also doesn’t work, even after I uploaded the file to my ionic viewer on my phone.

Any ideas? Thanks!


Try to import ionic template app and build it


Hey @amandalp,

I think, you injected the code at the wrong place, make sure to inject it in the instead of the config().


Hi guys, I wrote a whole tutorial for you, find it here.

If you need more information feel free to ask, I’m always here.

I wrote it from the Android perspective. I tested everything on a real device and code us reusable.


@Gajotres I want to implement it ! But i have a doubt !

How the sms is sent to the the user ? via internet or user’s network connection ? Does it charge the user for sending the sms ?

I just want to send the otp on the user’s phone itself for verifying the number ! or is thr any better way to do this ?

Thanks !


@Sumeet123 SMS is sent via a network connection. Technically nothing will change, only difference, you’ll use your own app to send an SMS.


so it will charge the user right ? like in india suppose a telecom service charges 1 rupee per sms !
Since its using a telecom service !


yup…it will…it is just another way of sending sms …as soon as the sms is sent the charges apply

#16 thanks for clearing the confusion ! please suggest some different way to cheive this which wont charge the user ! Thanks again


for anybody looking for a step by step tutorial on how to use the SMS plugin in a real application here’s a tutorial on how to create an application for buying public transport tickets via SMS:


Here’s an example in Ionic 2.


can i do the same on ios without open any app ?