I was trying to make an Android APP whose main function is to detect
if other android APPs are recording voice using Microphone. So far, I learned
that getRecordingState() from AudioRecord class can be used to get the state
of whether microphone is recording or not… but I need something like a broadcast
so I can catch the intent while the state of microphone starts to record voice…
any idea ? Thanks in advance!!
getRecordingState()returns the state for the particularAudioRecordinstance that you call the method on. It doesn’t give you some global state for all recorders.There’s currently no API available for applications to check globally whether there’s ongoing recording from the microphone. The
AudioFlingerhas that information (though not about which specific application that is doing the recording), but the only way for you to get hold of it would be to modify Android itself and run your own custom Android version.