Cordova短信插件

安德里亚·梅林(Andrea Merlin)

我正在用apache Cordova s​​ms插件编写Visual Studio 2015项目。我写这个小代码

function InviaSms()
    {
            var number = document.querySelector("#numberTxt").value;
            var message = document.querySelector("#messageTxt").value;

            //configurazione
            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 open any other app
                }
            };

            var success = function () { $('#erroresms').text = 'Message sent successfully'; };
            var error = function (e) { $('#erroresms').text = e; };

            sms.send(number, message, options, success, error);
    }

它可以在android平台上正常工作,但是当我将其部署为Windows Phone Universal应用程序短信功能时无法正常工作。

谢谢

Whebcraft

对于Windows Universal,仅使用Javascript执行此操作是“最干净的”,请参阅此https://github.com/cordova-sms/cordova-sms-plugin/issues/31

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章