Reputation: 1705
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!!
Upvotes: 1
Views: 4304
Reputation: 1753
Try AudioManager.isMicrophoneMute()
http://developer.android.com/reference/android/media/AudioManager.html#isMicrophoneMute()
Upvotes: 0
Reputation: 58507
getRecordingState()
returns the state for the particular AudioRecord
instance 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 AudioFlinger
has 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.
Upvotes: 1