安卓:打开一个弹出选择一个呼叫,只要用户来电 [英] Android: opening a choice popup for a call whenever a user calls

查看:157
本文介绍了安卓:打开一个弹出选择一个呼叫,只要用户来电的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • 这是一个持续的问题:<一href=\"http://stackoverflow.com/questions/6120254/android-how-to-interact-with-the-default-contacts-application\">Android:如何使用默认的联系人应用程序
  • 互动
  • This is a continued question from: Android: How to interact with the default Contacts application

您好所有,

我试图展现一个弹出让如果用户需要使用标准的拨号器或另外一个像低于用户选择:

I'm trying to show a popup to let a user choose if the user wants use the standard dialer or another one like below:

我听说'sipdroid也有类似的功能,CapDroid给了我一个很好的code(这下)从我的最后一个问题,这说明我的选择弹出后,我打电话,然后点击 HANG UP

I heard that 'sipdroid' has a similar function and 'CapDroid' gave me a good code(which is below) from my last question, which shows me a choice popup after I call and then HANG UP.


<intent-filter> 
  <action android:name="android.intent.action.VIEW" /
  <category android:name="android.intent.category.DEFAULT" /> 
  <category android:name="android.intent.category.BROWSABLE" /> 
  <data android:mimeType="vnd.android.cursor.dir/calls" /> 
</intent-filter>

我想只要用户试图修改此code,弹出选择对话框中的呼叫像使用默认的联系人或pressing主呼叫按钮,但失败了,还是不知道该怎么做。

I tried to modify this code to pop up the choice dialog whenever a user tries to CALL like using the default CONTACTS or pressing the main call button, but failed and still have no idea what to do.

如果任何人有这种想法或教程,请你给我一个建议吗?

If anybody has an idea or tutorial for this, would you please give me an advice?

推荐答案

我发现从一个解决方案: Android的 - 意向过滤器?

I found a solution from: Android - Intent Filter?

您允许的权限,并低于


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

<intent-filter >
    <action android:name="android.intent.action.CALL_PRIVILEGED" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:scheme="tel" />
</intent-filter>

这篇关于安卓:打开一个弹出选择一个呼叫,只要用户来电的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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