Search code examples
androidstreamcallmicrophone

Android audio stream and microphone


Im fairly new to Android development but from what I read I am pretty sure there is no direct API access to the in-call audio stream. I need to make something very close to an answering machine so I was wondering if there is any API support to pass an audiostream to the microhpone internally and use that as a workaround for not having access to the call stream. IE someone calls, we get the answer, mute the microphone so that he cant hear the environment and pass an alternative audiostream(some kind of recording) to the microphone while it is muted...That was the only workaround I can think of and I have no idea if something like that is possible, but I will appreciate any feedback. Thanks!


Solution

  • No, Android does not support injection of audio into the voice call uplink.
    There are some mobile platforms that support this functionality, but it's not something that's available to app developers since there's no API in place for it, regardless of whether you're using the Java APIs or the native APIs.