机器人:如何通过Android应用程序拨打的号码 [英] android: How to call the number by android application
本文介绍了机器人:如何通过Android应用程序拨打的号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
如何在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.
这篇关于机器人:如何通过Android应用程序拨打的号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文