How to disable sound feedback effect in Android TV Programmatically. If i press navigation button while music service is playing, sound effect mutes music for second. Or may be there is some priorities for music service? Thanks in advance
Asked
Active
Viewed 2,497 times
1 Answers
0
You can change it via the AudioManager like this:
AudioManager audioManager = (AudioManager) getApplicationContext().getSystemService(Context.AUDIO_SERVICE);
audioManager.adjustStreamVolume(AudioManager.STREAM_NOTIFICATION, AudioManager.ADJUST_LOWER, 0 /*or: AudioManager.FLAG_SHOW_UI*/);
To get the current notification volume, use
audioManager.getStreamVolume(AudioManager.STREAM_NOTIFICATION)
Possible volume values are 0..7.
From API level 23, you can also use AudioManager.ADJUST_MUTE.

PHolzwarth
- 327
- 1
- 5