AudioManager audio = (AudioManager) getSystemService(Context. AUDIO_SERVICE ); // get volume int currentVolume = audio.getStreamVolume(AudioManager. STREAM_MUSIC ); // set volume audio.setStreamVolume(AudioManager. STREAM_MUSIC , ( int ) volume, 0 );