Android调用打电话和发短信

1.打电话:
Intent intent=new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+“12345678910”));
startActivity(intent);

对应的权限 Manifest.permission.CALL_PHONE

2.发短信:

Uri uri2 = Uri.parse("smsto:"+“12345678910”);
Intent intentMessage = new Intent(Intent.ACTION_VIEW,uri2);
startActivity(intentMessage);

对应的权限 Manifest.permission.SEND_SMS






猜你喜欢

转载自blog.csdn.net/lvxiaobo1994/article/details/81029790