Javascript 钛合金预填充体

Javascript 钛合金预填充体,javascript,sms,titanium,titanium-mobile,Javascript,Sms,Titanium,Titanium Mobile,我正在Android中打开本机SMS composer,并希望预先填充SMS正文。我试过 Titanium.Platform.openURL('sms:?body=hello world!'); …但它增加了你好世界!到联系人字段。有没有什么方法可以添加到身体上 对于android,您可以使用intent发送短信 范例 var intent = Ti.Android.createIntent({ action : Ti.Android.ACTION_VIEW,

我正在Android中打开本机SMS composer,并希望预先填充SMS正文。我试过

Titanium.Platform.openURL('sms:?body=hello world!');

…但它增加了你好世界!到联系人字段。有没有什么方法可以添加到身体上

对于android,您可以使用intent发送短信

范例

var intent = Ti.Android.createIntent({
        action : Ti.Android.ACTION_VIEW,
        type : 'vnd.android-dir/mms-sms',
    });
    intent.putExtra('sms_body', <body text>);
    intent.putExtra("address", <number>);
    try {
        Ti.Android.currentActivity.startActivity(intent);
    } catch (ActivityNotFoundException) {
        Ti.UI.createNotification({
            message : "Error"
        }).show();
    }

对于iphone,您可以使用它发送短信。

对于iphone或android?我正在android上进行测试,但如果可能的话,我也想知道如何在iphone上实现。谢谢!我不想在后台发短信。我必须打开sms compose视图,只需预先填充sms正文。代码很好,但不能解决问题。我正在试图找到一种方法来打开sms组合并只填充正文。它是但不填充sms正文