本文档部分API缺少示例代码,诚挚的邀请你参与到示例代码的编写中来,你可以在代码中发布2行自定义注释,内容自拟。 有意者可与刺鸟联系(QQ:4041990 Q群:7702175)

API简介

uexMMS对象封装了系统发送彩信的操作。

接口说明

方法说明
uexMMS.open(inPhoneNum,inSubject,inContent,inMediaPath)打开系统发送彩信的界面,根据传入参数自动填写好彩信的相关信息。
open(inPhoneNum,inSubject,inContent,inMediaPath)

参数名称描述
inPhoneNum接收彩信的手机号码,只能为数字
inSubject彩信主题
inContent彩信正文内容
inMediaPath彩信媒体附件路径(支持的路径协议: wgt://... , /… , file://...等协议)

// 本代码由寒暄提供,如有bug请和寒暄联系(QQ:457696322 Q群:7702175)
<!DOCTYPE html>
<html>
<head>
<title>AppCan API uexMMS</title>
<meta charset='utf-8'>
<script>
window.uexOnload = function(type){
    if(!type){
        uexWidgetOne.onError=function(opCode,errorCode,errorDesc){
            console.log(errorCode+':'+errorDesc);
        }
    }
}
function $$(id){
    return document.getElementById(id);
}
function openMMS(){
    var tel = $$('telnm').value;
    var sub = $$('subject').value;
    var con = $$('content').value;
    var file = $$('filePath').value;
    uexMMS.open(tel,sub,con,file);
}
function filePick(){
    uexFileMgr.cbExplorer=function (opCode,dataType,data){
        $$('filePath').value = data;
    }
    uexFileMgr.explorer('');
}
</script>
</head>
<body>
    <div>
        <span>输入电话号码:</span>
        <input type='text' id='telnm' value='18810010011'><br>
        <input type='button' value='选择资源文件' onclick='filePick();'><br>
        <span>资源文件的路径为:</span>
        <input id='filePath' value=''><br>
        <span>输入发送的主题:</span><br>
        <textarea id='subject'>ye</textarea><br>
        <span>输入发送的内容:</span><br>
        <textarea id='content'>您好!</textarea><br>
        <span>打开彩信界面</span><br>
        <input type='button' value='打开彩信界面' onclick='openMMS()'>
    </div>
</body>
</html>