title: How do I mute all sounds of my application?
body: <p>I'm creating a quiz app just for learning, and I've got a problem.</p>
  
  <p>In my <code>mainactivity</code> I have a media player. It plays music even going through other activities, and I have a <kbd>mute</kbd> button to stop the music. I also have a sound effect when I successfully hit the right answer (on a question which is in other activity). But I don't know how to mute this SFX along with the background music when I press the <kbd>mute</kbd> button. Any hints? ;)</p>
  
  <p>If it has a way to mute my entire application will be so good. I found some ways to mute, but this way will mute the entire system. And it's</p>
  
  <pre><code>AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
  audioManager.setStreamMute(AudioManager.STREAM_MUSIC, false);
  </code></pre>