Android学习笔记七:调用打电话、发短信等
时间:2014-10-20 16:55:39
收藏:0
阅读:336
系统打电话界面:
Intent intent = new Intent();
//系统默认的action,用来打开默认的电话界面 intent.setAction(Intent.ACTION_CALL);
//需要拨打的号码
intent.setData(Uri.parse("tel:"+i)); callPhoneAndSendMessage.this.startActivity(intent);
系统发短信界面:
Intent intent = new Intent();
//系统默认的action,用来打开默认的短信界面 intent.setAction(Intent.ACTION_SENDTO);
//需要发短息的号码 intent.setData(Uri.parse("smsto:"+i)); callPhoneAndSendMessage.this.startActivity(intent);
原文:http://www.cnblogs.com/gaozy/p/4037327.html
评论(0)