2

For my app I need to play a pre recorded message to the caller. Say if someone calls my phone and I enable the app it should play back the audio such that the caller hears it. I tried setting the stream STREAM_DTMF,STREAM_VOICE_CALL ... (tried all of them) but nothing worked. STREAM_MUSIC made the audio play through the speaker but was not such that the caller could hear it ...

Tried searching around but have not found any answer yet ... would really appreciate if someone can respond !

Gaurav
  • 21
  • 1
  • 2

1 Answers1

1

This is not directly possible on current android phones, as the outgoing call audio does not pass through the application processor on which linux and android run.

Chris Stratton
  • 39,853
  • 6
  • 84
  • 117
  • Is there no way I can achieve this ? – Gaurav Dec 02 '10 at 00:45
  • Some people have toyed with playing sound out the speaker and hoping the microphone picks it up, but there's probably DSP to attenuate that feedback path. You could wire up a headphone jack as a loopback cable... As for doing it directly, not unless you are capable of modifying the code running on the radio co-processor, which would be an impressive feat of hacking for anyone not employed by the device manufacturer (and probably not something you want to attempt without a working jtag setup to unbrick with). – Chris Stratton Dec 02 '10 at 05:03
  • Hmm .. thanks Chris ... I guess its not worth that much of an effort ... Ill rather write a letter to santa n sit back ... ;) – Gaurav Dec 10 '10 at 01:48
  • Ar there any updates to this. Is it now possible to play pre-recorded audio to caller. – Xdrone Sep 27 '14 at 22:13