Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova: launch SMS app and confirm that an SMS was sent

Tags:

cordova

I am looking to Cordova as a possible solution to a problem and want to ask if it is even possible before coding. I can't seem to find any conclusive documentation by Googling.

I want to launch the SMS app and the determine whether the user actually sent the SMS, or just cancelled.

Can I do that with Cordova?


[Update] I cannot guarantee that any application is installed on the user's device. I am just serving a web page and want to know if I could launch the SMS app and determine if the user sent an SMS or not with Cordova.

like image 216
Mawg says reinstate Monica Avatar asked Nov 27 '25 10:11

Mawg says reinstate Monica


1 Answers

It is possible to send sms using cordova.

If you just want to open the SMS app with a clicked number, just add sms:YOURNUMBER to a href.

This is a SMS plugin: https://github.com/cordova-sms/cordova-sms-plugin

It also has a callback

    var success = function () { alert('Message sent successfully'); };
    var error = function (e) { alert('Message Failed:' + e); };
    sms.send(number, message, options, success, error);

Hope I could help.

Cheers

like image 193
GOSCHEN Avatar answered Nov 30 '25 06:11

GOSCHEN