Mute microphone

CapReed

Member
Licensed User
Longtime User
Good afternoon,

Is it possible to silence the microphone during a call programmatically?

Thank you!
 

CapReed

Member
Licensed User
Longtime User
Thank you,

I had seen it, but after you still can not get enough evidence that the micro is muted when I pick up a call automatically using AnswerCall library.

I will keep trying and if I do I tell you.
 
Upvote 0

CapReed

Member
Licensed User
Longtime User
Well, I've gotten at least in my Nexus 4.

I cheated a little. The point is that if I say that I disable the microphone BEFORE the call is not mute the microphone off hook.

However, if I run the command a few thousandths of a second AFTER the call is taken down, then the microphone is muted.

For this I use a timer and this code.

B4X:
Sub apaga
    Dim rr As Reflector
    rr.Target = rr.GetContext
    rr.Target = rr.RunMethod2("getSystemService", "audio", "java.lang.String")                  
    rr.RunMethod2("setSpeakerphoneOn", False, "java.lang.boolean")
    rr.RunMethod2("setMicrophoneMute", True, "java.lang.boolean")
    Log("Apagamos Sonido y Microfono, hipoteticamente ...")
End Sub

I hope I can serve some other partner, and if you have a better solution, please tell me.

Excuse for my bad English translator of google;-)
 
Upvote 0

CapReed

Member
Licensed User
Longtime User
Ok, ;-(

This is my code, can you try in your EVO and tell me the result?
 

Attachments

  • AnswerCall.zip
    7.6 KB · Views: 362
Upvote 0
Top