gpt4 book ai didi

ios - Phonegap SMSComposer 混淆

转载 作者:行者123 更新时间:2023-12-01 19:14:17 25 4
gpt4 key购买 nike

坚持 SMSComposer插入。我已按照所有步骤将 key 添加到插件列表并下载文件。这是来自 github 的最新版本,它让我感到困惑。我更了解旧的。如何指定 toRecipientsbody ?

function SMSComposer()
{
this.resultCallback = null;
}

SMSComposer.ComposeResultType =
{
Cancelled:0,
Sent:1,
Failed:2,
NotSent:3
}

SMSComposer.prototype.showSMSComposer = function(toRecipients, body)
{

var args = {};

if(toRecipients)
args.toRecipients = toRecipients;

if(body)
args.body = body;

Cordova.exec("SMSComposer.showSMSComposer",args);
}

SMSComposer.prototype.showSMSComposerWithCB = function(cbFunction,toRecipients,body)
{
this.resultCallback = cbFunction;
this.showSMSComposer.apply(this,[toRecipients,body]);
}

SMSComposer.prototype._didFinishWithResult = function(res)
{
this.resultCallback(res);
}

Cordova.addConstructor(function() {

if(!window.plugins) {
window.plugins = {};
}
window.plugins.smsComposer = new SMSComposer();
});

.
    <body>
<div class="app">
<h1>Apache Cordova</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
</div <center><button onclick="cordova.exec(null,null, 'SMSComposer','showSMSComposer',[args])">Compose SMS</button></center>

>
</div>
<script type="text/javascript" src="cordova-2.2.0.js"></script>
<script type="text/javascript" src="js/index.js"></script> <script type="text/javascript" charset="utf-8" src="SMSComposer.js"></script>

<script type="text/javascript">
app.initialize();

var args;

// cordova.exec(null,null, 'SMSComposer','showSMSComposer',[args]);



</script>

</body>
</html>

编辑:
button没有反应.控制台中没有错误消息。

最佳答案

试试这个:
https://github.com/wesson818/SMSPluginForCordova2.3.0
您可以在 Android 原生消息应用程序中传递消息正文并选择收件人。

关于ios - Phonegap SMSComposer 混淆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14330925/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com