Skip to content Skip to sidebar Skip to footer

Mute Only The Running Apps Sound In Android

I am developing an android application in which there is some speech to the user. there is also a mute button. Can i mute the sound of my application alone, not affecting the sound

Solution 1:

MediaPlayermp= MediaPlayer.create(context, R.raw.sound_file_1);
 mp.start();

for Mute

mp.setvolume(0,0);

& Unmute or full volume

mp.setvolume(0,1);

Post a Comment for "Mute Only The Running Apps Sound In Android"