电话呼叫应用 [英] Phone call application
本文介绍了电话呼叫应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建应用程序,它的工作前人的精力是这样的:
- 用户拨打(接触或通过拨号器)的电话号码
- 应用程序将采取一些它发送到服务器
- 服务器调用用户
- 用户接听电话
- 服务器调用数
我有一个问题。我无法处理来自Dailer意图,使用该的AndroidManifest.xml
:
<采用-SDK安卓的minSdkVersion =7/>
<使用许可权的android:NAME =android.permission.READ_CONTACTS/>
<使用许可权的android:NAME =android.permission.CALL_PHONE/>
<使用许可权的android:NAME =android.permission.PROCESS_OUTGOING_CALLS/><应用
机器人:图标=@绘制/ ic_launcher
机器人:标签=@字符串/ APP_NAME>
<活动
机器人:HomeScreenActivityNAME =
机器人:标签=@字符串/ APP_NAME>
&所述;意图滤光器>
<作用机器人:名字=android.intent.action.MAIN/> <类机器人:名字=android.intent.category.LAUNCHER/>
&所述; /意图滤光器>
< /活性GT;
<活动机器人:名字=CallProgressActivity>
&所述;意图滤光器>
<作用机器人:名字=android.intent.action.DIAL/>
<作用机器人:名字=android.intent.action.CALL/>
<类机器人:名字=android.intent.category.DEFAULT/>
&所述; /意图滤光器>
< /活性GT;
< /用途>
解决方案
要赶上拨出电话请查看<一个href=\"http://stackoverflow.com/questions/8268763/how-to-use-android-intent-action-call-privileged-and-android-intent-action-new-o\">this
和还
这
有关自动接听电话,请检查。
<一个href=\"http://$c$c.google.com/p/auto-answer/source/browse/trunk/src/com/everysoft/autoanswer/AutoAnswerIntentService.java\"相对=nofollow>这个
I am trying to create application, which sould work this way:
- User dial a phone number (in contact or by dialer)
- App will take the number send it to server
- Server calls to the user
- User answers the call
- Server calls to the number
I have one problem. I cant handle the Intent from Dailer, using this AndroidManifest.xml
:
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".HomeScreenActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="CallProgressActivity">
<intent-filter>
<action android:name="android.intent.action.DIAL"/>
<action android:name="android.intent.action.CALL"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
解决方案
To catch an outgoing call please check this
and also this
For auto-answering a call please check.
这篇关于电话呼叫应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文