Android手机开发:在程序中拨打电话


1. ACTION_DIAL方式,把电话号码复制到拨打页面,并不自动打出

  1. Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse(strTelphone));  
  2. startActivity(intent);  
2. ACTION_CALL方式,直接拨打电话号码
  1. Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(strTelphone));  
  2. startActivity(intent);  
第二个方式,还需要权限:
  1. <uses-permission Android:name="android.permission.CALL_PHONE" />  
第一个不需要。

相关内容