Setting the Intial Volume to the phones ring volume
<p>im trying to make it so when the user opens the app it sets the volume of the music to whatever they have their phones ringer volume at. This is my code so far but im not exactly sure what the paramters on setVolume(float, float) are. The android documentation doesn't explain it well. What is my code doing wrong here?</p>

<pre><code>  AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
  int currentVolume = audio.getStreamVolume(AudioManager.STREAM_RING);

   mPlayer = MediaPlayer.create(this, R.raw.song);
   mPlayer.setOnErrorListener(this);

   if(mPlayer!= null)
    {         
    mPlayer.setLooping(true);
    mPlayer.setVolume(currentVolume,1);
}
</code></pre>
