2011-04-05 51 views

回答

110
Intent callIntent = new Intent(Intent.ACTION_CALL); 
callIntent.setData(Uri.parse("tel:123456789")); 
startActivity(callIntent); 

编辑:必须添加在清单<uses-permission android:name="android.permission.CALL_PHONE" />为好。

+12

必须在Manifest中添加''。 – Mika 2013-01-28 07:14:47

69

试试这个,

Intent callIntent = new Intent(Intent.ACTION_CALL); 
callIntent.setData(Uri.parse("tel:123456789")); 
startActivity(callIntent); 

记住这个CALL_PHONE权限添加到您的manifest.xml

<uses-permission android:name="android.permission.CALL_PHONE" /> 

这可能帮助你。

相关问题