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.