I made Media Android TV application by using SimpleExoPlayer,
It can play some musics, some videos,
I want to track user when Mute|UnNute by using remote to trigger.
Therefore, I want to detect Mute|UnMute mode on current TV devices.
I research many pages, still not find out that,
Hope someone can help me the way,
Thank you,
p/s : These codes did not detect for Android TV
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;
}