Android 通话中出现干扰
我已经创建了用于结束呼叫的aidl 文件ITelephony.aidl
。现在,在结束通话之前,我需要生成正在进行的通话中的语音,以便听者假设下一步工作出现问题。 我尝试通过三种方式自己解决这个问题:
控制音频流音量
audioManager.setStreamMute(AudioManager.STREAM_VOICE_CALL, isMute); int 索引 = rand.nextInt(5); audioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL,索引,0);
另一种方法是使用 telephonyService 中的 setMute
http://androidsourcecode.blogspot.in/2010/ 10/blocking-incoming-call-android.html 但在 2.3 中工作
我也尝试过使用媒体播放器在通话进行时开始播放,但没有成功。 因此,如果有任何其他想法,请告诉我。
I have create the aidl file ITelephony.aidl
for ending the call. Now before the call should be ended, I need to generate the voice in ongoing call, so that the listener assumes that there is a problem in next work.
I have tried to solve this by myself in three ways:
Control the audio stream volume
audioManager.setStreamMute(AudioManager.STREAM_VOICE_CALL, isMute); int index = rand.nextInt(5); audioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL,index,0);
Another way is using the setMute in telephonyService
http://androidsourcecode.blogspot.in/2010/10/blocking-incoming-call-android.html
but working in in 2.3I have also tried to implement using media player for start playing when the call is going on but no luck.
So if there is any other idea then please let me know.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来你遇到了我不久前遇到的同样的问题:使用 Android 2.3 aka Gingerbread ,不再可能使用 ITelephony 接口,因为 MODIFY_PHONE_STATE 权限已仅标记为系统。
详细信息可以在此处找到。
It seems you have the same problem I had a while ago: With Android 2.3 aka Gingerbread it's no longer possible to use the ITelephony interface because the MODIFY_PHONE_STATE permission has been marked system only.
Details may be found here.