This video shows how to adjust audio volume in Sketchware android project.
Get the codes here:
http://www.sketchwarehelp.com/2017/11...
Define AudioManager:
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
Get Max Volume:
int max_volume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
Get Current Volume:
int current_volume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
Set Volume to 70%:
int volume70 = (int) max_volume * 7 / 10;
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, volume70, 0);
Mute audio:
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_MUTE, 0);
Unmute audio:
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_UNMUTE, 0);
Watch video Adjust audio volume from your app online, duration hours minute second in high quality that is uploaded to the channel Sanjeev Kumar 19 December 2021. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 834 times and liked it 28 visitors.