4

Is it possible in Android to manipulate phone call data live before they are sent? (for, eg. by creating a buffer where the voice is recorded then sent after) or is it inaccessible, and must always be "live"?

Kara
  • 6,115
  • 16
  • 50
  • 57

3 Answers3

2

Sorry, no. There is no supported way for an Android application to interact with the audio stream from a phone call.

Manish Dubey
  • 4,206
  • 8
  • 36
  • 65
2

Unlike pretty much all other audio, voice call audio is typically processed entirely by the modem subsystem. So the modem processor and it's associated DSP(s) (if it has any) has access to the voice call audio, but the application processor(s) don't, or at least don't modify it any way.

Some platforms allow the application processor to read the uplink/downlink audio either in their compressed form (AMR) or after decoding has been performed (PCM). But no platform used for Android devices that I know about has (complete) support for injecting data into the uplink. If there are any that do, it would be a completely non-standard feature.

Michael
  • 57,169
  • 9
  • 80
  • 125
  • 2
    Saying that it's "not working" sort of implies that it's supposed to be possible, but there's nothing to indicate that. I'm not aware of any statement from Google on this subject; although I can't recall seeing anything in the CDD about it _not_ being allowed, so any OEM would be free to add this feature if they wanted to (as long as it's legal in the market(s) where their devices are to be sold), even if it's not a standard feature of Android. There are very few legitimate reasons for injecting audio into a voice call though, and some serious security concerns. – Michael Jul 19 '13 at 14:24
  • Thx for your answer. Sounds interresting that an OEM is able to omplement it. So should a Custom ROM dev? Sounds like you have experience with that kind of topic. Can you tell me which classes have to be changed, any hints how it could be realized or where to start. – B770 Jul 19 '13 at 16:11
  • 1
    Maybe, I'm not sure which parts of the platform code custom ROM devs typically have access to. The implementation would vary between different platforms anyway (and may not be possible at all on some platforms). See for example http://stackoverflow.com/questions/14432521/background-music-for-call/14433414#14433414 and http://stackoverflow.com/questions/15204570/inject-uplink-audio-in-call-with-snapdragon-msm8960-soc/15205455#15205455 – Michael Jul 19 '13 at 16:22
0

Try doing the coding in C with JNI. Also I would recommend p_thread. As Android doesn't have control over such threads.