您的位置:首页 > 移动开发 > Android开发

[置顶] 调用Android发短信接口Intent.ACTION_SENDTO

2013-12-21 03:59 337 查看
调用Android发短信接口Intent.ACTION_SENDTO

public void welcome_register(View v) {
//		测试smsto
Uri sms_uri= Uri.parse("smsto:13517596490");//设置号码
Intent sms_intent = new Intent(Intent.ACTION_SENDTO,sms_uri);//调用发短信Action
sms_intent.putExtra("sms_body", "HelloWorld");//用Intent设置短信内容
startActivity(sms_intent);
//		String qqRegiter = this.getString(R.string.QQRegiter);// 获取资源中的字符串
//		if (qqRegiter != null && !(qqRegiter.equals(""))) {
//			Uri uri = Uri.parse(qqRegiter);// 设置一个统一资源定位符
//			Intent intent = new Intent(Intent.ACTION_VIEW, uri);// 展示一个新的View
//			startActivity(intent);
//		}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐