android之调用系统打电话与发短信界面

系统打电话界面:

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);

原文地址:https://www.cnblogs.com/lee0oo0/p/2399915.html