play an audio file on a voice call

前端 未结 2 1860
臣服心动
臣服心动 2021-01-12 11:10

I have a rather tricky question this time.
I want to know how to Inject audio to microphone source during a call.
I know I have read dozens of topics here and there

相关标签:
2条回答
  • 2021-01-12 11:34

    But what are you trying to achieve? Are you trying to implement some kind of answering machine? The only way you could inject audio during a call is if you release your own android version. Download the sources, modify them, and release. Good luck :)

    0 讨论(0)
  • 2021-01-12 11:49

    From the official documentation:

    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.

    The only thing I could think of would be to somehow interleave the call sound and the sound you want to play, but you don't have direct control over the call sound, so this is likely impossible.

    It looks like this may change in 3.3, but it's currently not possible to do without using the NDK and/or writing your own distro of Android.

    Sorry! :(

    0 讨论(0)
提交回复
热议问题