使用默认的呼叫应用拨打电话的Andr​​oid应用程序 [英] Make Call in Android Application using default call application

查看:158
本文介绍了使用默认的呼叫应用拨打电话的Andr​​oid应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下code键使从我的Andr​​oid应用程序的调用:

I am using following code to make a call from my android application:

Intent intent = new Intent(Intent.ACTION_CALL);                 
intent.setData(Uri.parse("tel:9898989898"));
startActivity(intent);

这将打开,如果是安装在手机Skype的意图选配。我要的是它应该做直接从默认呼叫应用呼叫。

This opens Intent Chooser if Skype is installed in phone. What i want is it should directly make call from default call application.

我怎样才能做到这一点?

How can i achieve this?

先谢谢了。

推荐答案

使用 intent.setPackage(com.android.phone);

如同

Intent intent = new Intent(Intent.ACTION_CALL);  
intent.setPackage("com.android.phone");               
intent.setData(Uri.parse("tel:9898989898"));
startActivity(intent);


但更好的是让用户选择。


But better is to let the user to choose.

了解更多在如何从Android原生拨号器拨打电话,忽略其他拨号器

这篇关于使用默认的呼叫应用拨打电话的Andr​​oid应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆