title: Android MediaPlayer ignores it's internal volume when the system volume changes
body: <p>here is my situation:</p>
  
  <p>I have a media player playing music in an Android application. I've found that with certain headphones, the volume is much too loud even when the volume is set to it's lowest setting. As a result, I want to change the volume of the music for all volume levels to be 10% of what it normally is (actually, this value is user-defined of course).</p>
  
  <p>The following works perfectly:</p>
  
  <pre><code>mediaPlayer.setVolume(0.1f, 0.1f);
  </code></pre>
  
  <p>The volume of the music is now at a good level for listening.  However, if the user now changes the volume using the volume rocker (thus changing the music stream volume), the media player changes the volume as expected, but it also seems to reset the 'setVolume' parameters to 1.0, causing a massive volume change.  Setting the volume back to 0.1 sets the volume to how it should be (which is 10% of the current music stream volume).</p>
  
  <p>To quote the Android docs for the MediaPlayer.setVolume method:</p>
  
  <blockquote>
    <p>This API is recommended for balancing the output of audio streams within an application</p>
  </blockquote>
  
  <p>How can you do this if it gets reset to 1.0 each time the system volume changes?</p>
  
  <p>Any help muchly appreciated. Thanks.</p>