title: Issues with volume using MediaPlayer on Android
body: <p>I'm having problems playing sounds with MediaPlayer. If the sound starts when the volume of the device is 0, then it won't play. I'll explain: if in the moment of start playing a sound, the device has volume = 0, and afterwards I increase the volume, it still doesn't sound. However, if it has volume != 0 when the sound starts, I can lower it to mute, and then increase it again and it's still playing.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>mpMusic = MediaPlayer.create(context, R.raw.musicmenu_overcast);
  float streamVolume = manager.getStreamVolume(AudioManager.STREAM_MUSIC);
  streamVolume = streamVolume / manager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
  mpMusic.setVolume(streamVolume, streamVolume);
  mpMusic.start();
  mpMusic.setLooping(true);
  </code></pre>
  
  <p>What am I doing wrong? Thank you all!</p>