Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 3212

Android mute microphone

$
0
0

Looking for a way to mute the microphone on an android device.

 

I have done this in B4a using the code below. Just not sure how to convert it to FireMonkey code.

 

Sub SetMic(Value As Boolean)

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", Value, "java.lang.boolean")

End Sub

 

Anyone know how to convert this?

 

Thanks

 


Viewing all articles
Browse latest Browse all 3212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>