Android: Queries on muting voice call stream

Viewed 39

I'm really new to programming and it is completely possible that my question is extremely basic.

I created a bare-bones default phone app on android, and am attempting to mute the voice call audio stream on the Tx and Rx direction programmatically. I have tried using some of the methods available in the AudioManager class; specifically, I have attempted to use the following:

  1. adjustStreamVolume -> Here, I use AudioManager.STREAM_VOICE_CALL as the stream type and use AudioManager.ADJUST_MUTE as the direction.
  2. setStreamVolume -> Here, I use AudioManager.STREAM_VOICE_CALL as the stream type and use AudioManager.ADJUST_MUTE as the index.

Both of these approaches do not result in muting of the voice call audio stream. I wonder if I'm missing out on something or whether I have incorrectly interpreted documentation. Any assistance or insights into this would help a great deal.

Thank You!

0 Answers
Related