DKI*_*KIT 118
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:123456789"));
startActivity(callIntent);
Run Code Online (Sandbox Code Playgroud)
编辑:还必须添加<uses-permission android:name="android.permission.CALL_PHONE" />
Manifest.
小智 71
试试这个,
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:123456789"));
startActivity(callIntent);
Run Code Online (Sandbox Code Playgroud)
请记住将此CALL_PHONE
权限添加到您的manifest.xml
:
<uses-permission android:name="android.permission.CALL_PHONE" />
Run Code Online (Sandbox Code Playgroud)
这可能对你有所帮助.
归档时间: |
|
查看次数: |
46041 次 |
最近记录: |