Can we detect which android application is using the microphone?

前端 未结 1 1134
独厮守ぢ
独厮守ぢ 2021-01-21 16:09

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
相关标签:
1条回答
  • 2021-01-21 16:38

    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.

    0 讨论(0)
提交回复
热议问题