关于窃听的电话号码联系Android的定制拨号器 [英] Android custom dialler on tapping phone number links
问题描述
我要实现自定义的拨号器应用程序。那么它不会使普通电话,而是将连接到一些服务estabilish VoIP连接。这是简单的部分,我想我可以胜任。但是,另一部分则是一个有点棘手我。我想注册我的拨号器不知何故在系统中有它在上下文菜单当你点击在电子邮件例如电话号码联系。现在,当你点击的次数,默认情况下会出现拨号。我想要显示上下文菜单,从中可以选择,如果你想用电话或者我的拨号器。可能吗?有人可以提供我一些建议吗?
确定。我知道我需要创建一些意向性过滤器的。这是我做的,但它不工作。不过在上下文菜单中没有我的应用点击电话号码时,在一些电子邮件。
<意图过滤器的Android版本:优先=100>
<作用机器人:名称=android.intent.action.CALL_PRIVILEGED/>
<作用机器人:名称=android.intent.action.DIAL/>
<类机器人:名称=android.intent.category.DEFAULT/>
<类机器人:名称=android.intent.category.BROWSABLE/>
<数据机器人:计划=电话/>
<数据机器人:计划=致电第一/>
&所述; /意图滤光器>
你的问题临屋的回答是:
<意向滤光器>
<作用机器人:名称=android.intent.action.VIEW/>
<作用机器人:名称=android.intent.action.DIAL/>
<类机器人:名称=android.intent.category.DEFAULT/>
<类机器人:名称=android.intent.category.BROWSABLE/>
<数据机器人:计划=电话/>
&所述; /意图滤光器>
I have to implement custom dialler application. Well it will not make regular phone call, instead it will connect to some service to estabilish VoIP connection. That is simple part I think I can handle it. But the other part is a bit tricky for me. I want to "register" my dialler somehow in the system to have it in context menu when you click on a phone number link in an e-mail for example. Now, when you click the number, default dialler appears. I want context menu to be shown where you can select if you want to use phone or my dialler. Is it possible? Can someone provide me some more tips?
OK. I know I have to create some intent-filter for that. Here is what I did but it does not work. Still no "My App" in the context menu when clicking phone number in some e-mail message.
<intent-filter android:priority="100">
<action android:name="android.intent.action.CALL_PRIVILEGED" />
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tel" />
<data android:scheme="callto" />
</intent-filter>
Tha answer for your question is:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tel" />
</intent-filter>
这篇关于关于窃听的电话号码联系Android的定制拨号器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!