title: How to know which application is using the microphone
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/11886824/can-we-detect-which-android-application-is-using-the-microphone">Can we detect which android application is using the microphone?</a>  </p>
  </blockquote>
  
  
  
  <p>I want to detect which application is using the microphone.</p>
  
  <p>Suppose two applications have access to the microphone.  For an application to use the microphone, it should have <code>android.permission.RECORD_AUDIO</code>.</p>
  
  <p>With the <code>lsof</code> command, we can detect the microphone is being used, but not the application name that is using it.  So we can list down all the currently running applications, then we can check which application has <code>android.permission.RECORD_AUDIO</code> permission, <strong>but here is the problem:</strong></p>
  
  <p>Suppose we have two applications named "A" and "B".  A can only record voice while B has an option to record voice and maintain network status.  As both can record voice, both will have <code>android.permission.RECORD_AUDIO</code> permission.  So we can know that both A and B can use the mic, but at present, which one is using the mic?  How can I avoid such confusion?</p>