由网友(那伤╮耀眼德美)分享简介:可能重复: 如何在Android中使用意向做电话? 请给我code,通过Android应用程序使用的电话号码。多谢解决方案 意图callIntent =新的意图(Intent.ACTION_CALL);callIntent.setData(Uri.parse(电话:123456789));startActiv...![小小机器人带来的改变 Android系统解析](https://p.xsw88.cn/allimgs/daicuo/20230906/2373.png)
可能重复: 如何在Android中使用意向做电话?
请给我code,通过Android应用程序使用的电话号码。
多谢
解决方案 意图callIntent =新的意图(Intent.ACTION_CALL);
callIntent.setData(Uri.parse(电话:123456789));
startActivity(callIntent);
修改:必须添加<使用-权限的Android:名称=android.permission.CALL_PHONE/>
的清单,以及
![小小机器人带来的改变 Android系统解析](https://p.xsw88.cn/allimgs/daicuo/20230906/2373.png)
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.
相关推荐
最新文章