1. 首先在AndroidManifest.xml中添加撥打電話的權限
<uses-permissionandroid:name="android.permission.CALL_PHONE"/>
2. 在onclick方法中:
//擷取電話号碼
String number = editText_number.getText().toString();
Intent intent = new Intent();
Intent.setAction(Intent.ACTION_CALL);
Intent.setData(Uri.parse(“tel:”+number));
startActivity(intent);