问题描述
字符串x =Hello World的;
字符串Y =你摇滚!;
意图sendIntent =新的意图(Intent.ACTION_VIEW);
sendIntent.putExtra(sms_body,x)的;
sendIntent.putExtra(sms_body,Y);
sendIntent.setType(vnd.android-DIR / MMS,SMS);
startActivity(sendIntent);
我想通过短信发送多消息体,但只有你摇滚!被显示。我想要做的是能够显示多条消息,并让它pre格式(在不同的线路)。
因此,例如......
的Hello World
你摇滚!
如果您想发送一个多行信息只是把一个换行符2串之间。
X +\ N+ Y
如果要发送多封邮件是没有办法做到这一点,我是知道的。你可以使用[startActivityForResult] [1],然后在你的活动[onActivityResult] [2]的方法,您可以发送再下一条消息。
[1]:http://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, INT)
[2]:的, INT,android.content.Intent)
String x="Hello World";
String y="You Rock!!!";
Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.putExtra("sms_body", x);
sendIntent.putExtra("sms_body", y);
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent);
I'm trying to send a multiple message bodies via SMS, but only "You Rock!!!" is displayed. What i want to do is be able to display multiple messages and have it pre-formatted (on different lines).
So for example...
Hello World
You Rock!!!
If you want to send a multi-line message just put a newline between the 2 strings.
x + "\n" + y
if want to send multiple messages there is no way to do that, that I am aware of. You could use [startActivityForResult][1] then in your activities [onActivityResult][2] method you can send then next message.
[2]:http://developer.android.com/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)
这篇关于发送短信意图的Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!