如何在android中的语音通话中播放音频文件 [英] How to play an audio file on a voice call in android

查看:124
本文介绍了如何在android中的语音通话中播放音频文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 android 应用程序,它必须在通话过程中播放音频文件并且对方应该听到它.

I am developing an android application which must play an audio file during a call and the other party should hear it.

有什么办法可以在android中做到这一点?我在过去 2 个月内搜索了它,但不知道.如果你们中有人遇到同样的问题,请与我分享您的想法.

Is there any way to do this in android? I searched for it by last 2 months, but no idea. If any of you crossed the same problem, please share your ideas with me.

推荐答案

虽然这是一个旧帖子,但我认为可以分享我迄今为止尝试这个的经验..

While this is a old post, thought would share the experience i have so far with trying this..

在最简单的意义上,不......你不能但是这里有一些"例外,但是如果你想为公众构建一个应用程序......这不适合你....... 其设备特定...

In the simplest sense, no.. you can not But there are "some" exceptions here, but if your looking to build an application for the public.. This is not for you... its device specific...

为什么我们不能在通话中播放音频

简单的事实是,电话通话期间的麦克风/输入音频流无法进行预处理或替换为任何形式的其他流.

The simple fact is the microphone / input audio stream during a phone call is not able to be pre-processed or replaced with another stream of any form.

因此,虽然人们认为在通话期间使用媒体很容易,但由于 android 系统处理音频的方式,这根本不可能.

So simply while one would think its easy to use media during a call, it simply is not possible due to the way the android system processes the audio.

那么人们是怎么做的??

好吧,让我们从简单开始......他们没有,他们已经设法破解或使用漏洞利用来做到这一点,或者使用一些特定于设备的编程来做到这一点......一个代码不适合这里

Well lets start simple... They have not, they have managed to hack or use a exploit to do so or some device specific programming to do this.. ONE CODE WILL NOT FIT ALL HERE

就我对这个主题的了解和研究,有一些方法可以使用 adb 或弄乱 codecskernel.. 但我并没有对此进行深入研究,因为我正在理想地寻求一种适用于所有设备并且仅受所使用的 API 限制的解决方案.

As far as i have been able to see and research on this topic, there are means by using adb or messing with codecs and the kernel.. But simply i have not looked to far into this as i am ideally seeking a solution that works on all devices and is only restrictive by the API being used.

为什么安卓/谷歌/硬件对我们这样做???

好吧,你的猜测和我的一样好,但有人会认为这与利用它的方式有关..有一个应用程序来掩盖你的声音,一个为你接听电话的胭脂应用程序等等..很简单我自己可以看到很多很好的理由为什么不允许它,但真的希望它被允许/可能,因为无论如何人们都会被任何技术搞砸.

Well your guess is as good as mine, but one would think its to do with the way this can be exploited.. Having a application to mask your voice, a rouge application that answers calls for you and so on.. Simply i myself can see plenty of good reasons why to not allow it, but really wish it was allowed/possible because with any technology people will be screwed over with anyway.

替代方法????

嗯,这是一个棘手的问题,如果您的核心要求是通过电话在与另一方的实时通话中播放音频流,那么根本就没有真正的替代方案......有些人恢复使用 VoIP 进行重定向和处理这种或其他逻辑方法..

Well this is the tricky question, simply there is no true alternative if your core requirement is to play an audio stream on a live call to the other party from your phone... Some people revert to using VoIP for redirecting and handling this or other logic methods..

声称这样做的应用程序!?!?!

首先,下载一个并用两部手机进行测试......声音是否真的与您的正常音频一起流式传输给他们,还是只是显得微弱/破碎或根本没有.

Firstly, download one and test it with two phones.... Does the sound truely get streamed along with your normal audio to them or does it just appear faint/broken up or not just there at all.

唯一真正适用于所有 android 设备的已知方法是使用扬声器.这样做的有效方法,而不是人们简单地说不,这不可能"..

The only true known method that works on all android devices, is using the loud speaker.. Which also makes me wonder why Elias was down voted for this as technically its the only answer that is a valid way of doing this instead of people simply saying "No, Its Not Possible"..

唯一能够真正以任何方式运行的应用程序是针对固定设备的应用程序.它们不适用于杂牌或一般情况下适用于所有安卓设备.阅读评论并亲自了解

The only applications to truly have this working in any way, are the ones who are targeted for set devices.. They will not work with a no-name brand or in general with all android devices. Read the reviews and find out for yourself

我们平时都做了些什么……希望有可能…………

SO WHAT DO WE DO IN THE MEAN TIME ............... wish that it was possible ............

这篇关于如何在android中的语音通话中播放音频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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