title: How to turn the volume to max programmatically on android?
body: <p>I am writing an app for android that turns up the volume and plays a song for 45 seconds and then stops.  That works great, however I can only get the volume to turn up to 50%, Is there a way to turn the volume up to 100% using setVolume()?</p>
  
  <p>This is my code:</p>
  
  <pre><code>final MediaPlayer mp = MediaPlayer.create(context, R.raw.sound_file_1);
  
  //plays eye of the tiger for 45 seconds
  if (messages.contains("MUSIC ONLY")){
  
      //turn up the volume
      mp.setVolume(20, 20);
      mp.start();
  
      //play ring tone for 45 seconds
      new Timer().schedule(new TimerTask() {
          @Override
          public void run() {
              mp.stop();
          }
      }, 45000);
  }
  </code></pre>