Can we detect which android application is using the microphone?

佐手、 提交于 2020-01-11 10:24:14

问题


Hello everyone i am new to android ndk and want to find two things:

  1. Can we detect whether the microphone is on or not?
  2. Can we detect which application is using the microphone?

It would be good if anyone knows any idea how to do above through C or through android sdk.


回答1:


1.

AudioManager am =  Context.getSystemService(Context.AUDIO_SERVICE)
am.isMicrophoneMute()

But I don't know how to do it using NDK (and no one seems to know).

AudioManager documentation

2.

No you can't. And that is a security decision. As @AndiJay said, malicious programs could then be used.



来源:https://stackoverflow.com/questions/11886824/can-we-detect-which-android-application-is-using-the-microphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!