title: Detect Mute|UnMute on Android TV
body: <p>I made Media Android TV application by using <a href="https://github.com/google/ExoPlayer" rel="nofollow noreferrer">SimpleExoPlayer</a>,</p>
  
  <p>It can play some musics, some videos,</p>
  
  <p>I want to track user when Mute|UnNute by using remote to trigger.</p>
  
  <p>Therefore, I want to detect Mute|UnMute mode on current TV devices.</p>
  
  <p>I research many <a href="https://developer.android.com/reference/android/media/AudioManager" rel="nofollow noreferrer">pages</a>, still not find out that,</p>
  
  <p>Hope someone can help me the way,</p>
  
  <p>Thank you,</p>
  
  <p>p/s : These codes did not detect for Android TV</p>
  
  <pre><code>You can use AudioManager to check volume is mute or not mute.
  
  AudioManager audio = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
  switch( audio.getRingerMode() ){
  case AudioManager.RINGER_MODE_NORMAL:
  break;
  case AudioManager.RINGER_MODE_SILENT:
  break;
  case AudioManager.RINGER_MODE_VIBRATE:
  break;
  }
  </code></pre>