1

I need to play some DTMF tones during a call through the uplink of the call. I found the code to generate the DTMF tone:

public void PlayDtfmTone(){

    ToneGenerator toneGenerator= new   ToneGenerator(AudioManager.STREAM_DTMF,ToneGenerator.MAX_VOLUME);
    //this will play tone for 2 seconds.
    toneGenerator.startTone(ToneGenerator.TONE_DTMF_1, 2000);

}

But the problem is how to inject it to the uplink of the call. I tried to play it in loud to the speaker to have the mic getting it, but for some reason it doesn't work and the mic doesn't capt it. I think it is because some echo cancellation system. Does anybody know how can I do to overcome this problem?

Dov
  • 21
  • 3

0 Answers0