简体   繁体   English

使用android拨打电话而无需离开应用

[英]Call a phone number with android without leaving app

I have an app that, due to lack of mobile data in all areas, uses phone connection to make a phone call. 我有一个应用程序,由于在所有区域都缺少移动数据,因此使用电话连接拨打电话。 There is some important information on the screen in my app, so I want to place the call without leaving my app screen. 我的应用程序的屏幕上有一些重要信息,因此我想拨打电话而不离开我的应用程序屏幕。 Is there any way to do this? 有什么办法吗?

Add the following permission in mainfest file 在mainfest文件中添加以下权限

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

Use the below code to start calling 使用以下代码开始调用

Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + "123456789" ));
startActivity(intent);

If you want to implement inside tha app read the tutorial which will help you alot 如果您想在应用程序内实现,请阅读教程 ,这将帮助您很多

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 来自来电的电话号码无法正常工作 - phone number from incoming call not working android 在android中阻止电话号码,不带任何铃声 - In android block a phone number without a single ring 如何在不将活动切换到 android 中的默认呼叫应用程序的情况下拨打电话? - How to make a phone call without switching activities to a default calling app in android? Android-通话后启动应用程序 - Android - Start App Upon Phone Call 对于 API &gt; 29 和 API &lt; 29 对于 Android 应用程序,我需要获取来电电话号码和该号码的通话记录的最低权限是多少? - What are the minimum permissions I need to get incoming phone number and call history for that number for API > 29 and API < 29 for Android app? Android Sip:如何在不使用SIP地址的情况下进行音频通话(我想改用真实的电话号码) - Android Sip: How to make audio call without using SIP address (I want to use real phone number instead) Android - 无法从列表视图拨打不同的电话号码,但显示不同的电话号码 - Android - cannot call different phone number from list view but showing different phone number 如何编写电话号码以在android中拨打电话但不拨打电话 - How to write a phone number for calling in android but not make the call 如何在Android中实现图片按钮通话(无电话号码输入editText)? - How to implement image button to call (no phone number input editText) in android? 使用Webview的Android应用-触发设备事件或电话 - Android app using webview - trigger device event or phone call
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM