Thursday, July 5, 2012

Android mute and unmute sound

Android mute and unmute sound  
Below i write the code set device sound mute and unmute.
Problem.
For Ex: you are developing game application . if you want set game sound mute and unmute or anything else.
Solution.
Sound UnMute :
/**
* @author vijayakumar
*/

AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE); audio.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
Sound Mute:
/**
* @author vijayakumar
*/

AudioManager audio = (AudioManager) getSystemService(Context.AUDIO_SERVICE); audio.setRingerMode(AudioManager.RINGER_MODE_SILENT);

1 comment:

  1. The borrowers tend not to have to put the security for that obtainment from the fund because quick loans do not carry
    the unacceptable terms and conditions payday loans Online
    thus, it would never be difficult that you can kick out your cash
    crunches from a life and you can handle it perfectly.

    ReplyDelete

Check out this may be help you

Related Posts Plugin for WordPress, Blogger...