Send sms via intent

1 vote · 2 comments

Send an sms via intent

raw ·
copy
· download
Uri smsUri = Uri.parse("tel:100861"); Intent intent = new Intent(Intent.ACTION_VIEW, smsUri); intent.putExtra("sms_body", "shenrenkui"); intent.setType("vnd.android-dir/mms-sms"); startActivity(intent);
Add a comment

2 Comments

This

Uri smsUri = Uri.parse("sms:100861");
Intent intent = new Intent(Intent.ACTION_VIEW, smsUri);
intent.putExtra("sms_body", "shenrenkui");
startActivity(intent);

works better.

Reply · May 9, 2012, 2:03 p.m.
Reply · May 12, 2012, 5:40 a.m.