首页 > 技术文章 > android 发送短信功能

jenson138 2015-03-23 15:27 原文

1     private void sendSMS(String num,String smsBody) { 
2         String phoneNum = "smsto:" + num;
3         Uri smsToUri = Uri.parse(phoneNum);  
4         Intent intent = new Intent(Intent.ACTION_SENDTO, smsToUri);  
5         intent.putExtra("sms_body", smsBody);  
6         startActivity(intent);  
7     }  

推荐阅读