title: How to increase the ringer & notification volume programmatically in android
body: <p>I am trying to enable the ringer normal mode and increase the volume programmatically.</p>
  
  <pre><code>AudioManager mobilemode = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE);
  //   int streamMaxVolume = mobilemode.getStreamMaxVolume(AudioManager.STREAM_RING);
  switch (mobilemode.getRingerMode()) {
      case AudioManager.RINGER_MODE_SILENT:
          Log.i("MyApp","Silent mode");
  
          mobilemode.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
          mobilemode.setStreamVolume (AudioManager.STREAM_MUSIC,mobilemode.getStreamMaxVolume(AudioManager.STREAM_MUSIC),0);
          break;
      case AudioManager.RINGER_MODE_VIBRATE:
          Log.i("MyApp","Vibrate mode");                     
          mobilemode.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
          mobilemode.setStreamVolume (AudioManager.STREAM_MUSIC,mobilemode.getStreamMaxVolume(AudioManager.STREAM_MUSIC),0);
          break;
      case AudioManager.RINGER_MODE_NORMAL:
          Log.i("MyApp","Normal mode");
          break;
  }
  </code></pre>
  
  <p>But It enable the normal mode. But I can not increase the volume. </p>
  
  <p><img src="https://i.stack.imgur.com/7FXrN.jpg" alt="enter image description here"></p>
  
  <p>Please let me any way to increase the volume programmatically..</p>