Android: Volume Controll

Hi all below is the code to manage your media volume

Call this API in your onCreate():
setVolumeControlStream(AudioManager.STREAM_MUSIC);

and if you manager call, alarm, notification etc, call below method in onCreat(), your device volume control will set automatically to that
this.setVolumeControlStream(AudioManager.STREAM_MUSIC);
this.setVolumeControlStream(AudioManager.STREAM_RING);  
this.setVolumeControlStream(AudioManager.STREAM_ALARM);  
this.setVolumeControlStream(AudioManager.STREAM_NOTIFICATION);  
this.setVolumeControlStream(AudioManager.STREAM_SYSTEM);  
this.setVolumeControlStream(AudioManager.STREAM_VOICECALL);