直接上代码
Intent intent = new Intent();
intent.setAction(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:" + "10086"));
startActivity(intent);
记得加权限
<uses-permission android:name="android.permission.CALL_PHONE"/>
直接上代码
Intent intent = new Intent();
intent.setAction(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:" + "10086"));
startActivity(intent);
记得加权限
<uses-permission android:name="android.permission.CALL_PHONE"/>