[英]how to send sms in android using phonegap 2.3.0?
我已經開發了使用2.3.0版本的phonegap應用程序。這個應用程序有太多的手機插件,如下載器,pdfviewer,statusbarnotification,video。現在我想將sms插件實現到同一個application.i中試圖實現sms插件使用這個應用程序,但不工作。 我喜歡與多種版本的cordova混淆。所以請清楚我的問題,如何包含和編寫發送短信代碼,使用phonegap發送短信,以及如何將短信插件包含到我的應用程序中。與我分享答案非常清楚。提前致謝
這個SMS插件適用於phonegap 2.3.0
樣品:
<script type="text/javascript">
sendSmsDemo = function() {
cordova.exec(function(winParam) {
// Use the following line if json2 library is present.
// Available from Douglas Crockford's github page here:
// https://github.com/douglascrockford/JSON-js/blob/master/json2.js
console.log( JSON.stringify(winParam) );
alert(winParam.sms_send);
}
, function(error) {
alert("An error has occurred");
console.log("An error has occurred");
// Please refer to previous comment about json2 library.
console.log( JSON.stringify(error) );
}
, "SendSms"
,"SendSms"
, ["TESTNUM", "This is random text."]);
}
</script>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.