后台音频在正在进行的呼叫 - 可能吗? [英] Background Audio for a Call in Progress - Possible?
问题描述
我写这是应该的播放一个音频文件时,通话中从一个具体的数字来。我试过很多方法..但在静脉都去<一个Android应用/ p>
- 单独的线程
- 在电话服务监听
- 开始并行 服务
任何一个可以请帮我如何对此进行呢?
更新:
我能够发挥随叫随到收到一个MP3文件,我能够发挥它的扬声器负载..但怎么过响我玩的是主叫方是不是能听它....反正我有可以推动扬声器流调用流
从API文档的此处
请注意:您可以将音频数据回放只有到标准输出
设备。目前,这是在移动设备的扬声器或蓝牙
耳机。在交谈过程中的音频无法播放声音文件
一个电话。
块引用>所以从这个和其他很多这样的答案,我们可以得出结论,在通话过程中过程中,我们不能播放音频。
不过从手机中的个人经历很长一段时间以前,我得到了一个结果,其中audiotrack被打,而有一个呼叫建立,无论是声音被同时听到。所以我觉得这要看手机是否允许它那么你就可以玩了。
您可以尝试另一件事实验。发挥使用不同的途径(免提或蓝牙)音频。
另一个选择是建立自己的定制的Android版本。
I am writing a android app which is supposed to play back a audio file when a call is in progress coming from a specific number .. I tried many approaches.. but all went in vein
- Separate Thread
- Listener on Telephone service
- starting a service in parallel
can any one please help me how to proceed regarding this ?
Update :
I am able to play a mp3 file on call recieve and i am able to play it load on speaker.. but how ever loud i play the calling party is not able to listen to it.... is there anyway i can push the speaker stream to call stream
解决方案From the api doc here
Note: You can play back the audio data only to the standard output device. Currently, that is the mobile device speaker or a Bluetooth headset. You cannot play sound files in the conversation audio during a call.
So from this and lots of other so answers we can conclude that we can not play an audio during a call process.
But a long time ago from a personal experience with a handset I got a result where the audiotrack was playing while there was a call established and both the voices were heard at the same time. So I think this depends on handsets if it allows it then you can play.
You can try another thing experimentally. play the audio using a different route ( speakerphone or bluetooth).
Another option is to build your custom android build
这篇关于后台音频在正在进行的呼叫 - 可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!