通过短信分享只 [英] Share via SMS only
本文介绍了通过短信分享只的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的应用程序有一个图片按钮,点击上应通过短信只发送一段文本的的。如何让我的应用程序来做到这一点?请帮助。
My app has an image button which on click should send a piece of text via SMS only. How do i get my app to do that? Please help.
我也希望用户能够选择从他的装置上的联系人列表中的联系人。
I also want to the user to be able to choose a contact from the list of contacts on his device.
Jumana
推荐答案
要使用意图发送短信,使用code:
To send sms using intents, use this code:
String smsBody="Sms Body";
Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.putExtra("sms_body", smsBody);
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent);
我希望这帮助!
这篇关于通过短信分享只的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文