可能重复: 如何在Android中使用意向做电话?
请给我code,通过Android应用程序使用的电话号码。
多谢
解决方案 意图callIntent =新的意图(Intent.ACTION_CALL);
callIntent.setData(Uri.parse(电话:123456789));
startActivity(callIntent);
修改:必须添加<使用-权限的Android:名称=android.permission.CALL_PHONE/>
的清单,以及
Possible Duplicate: how to make phone call using intent in android?
Please give me code for calling the number through android Application.
Thanks a lot
解决方案Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:123456789"));
startActivity(callIntent);
Edit: Must add <uses-permission android:name="android.permission.CALL_PHONE" />
in Manifest as well.
上一篇:sw600dp和w600dp之间的区别?区别、sw600dp、w600dp
下一篇:机器人的WebView播放HTML5 / H.264 / MP4视频,如何获得在MediaPlayer的机器人、如何获得、视频、WebView