Tag Archives: RINGER_MODE_VIBRATE

How to set your Android phone in Silent Mode or Vibrate Mode or Normal Mode programatically?

By | July 19, 2011

First create an instance of the AudioManager Class using which you can set the phone in Normal, Silent and Vibration Mode. AudioManager audio_mngr = (AudioManager) getBaseContext().getSystemService(Context.AUDIO_SERVICE); For setting the phone in Silent mode.. audio_mngr .setRingerMode(AudioManager.RINGER_MODE_SILENT); For setting the phone in Normal mode.. audio_mngr .setRingerMode(AudioManager.RINGER_MODE_NORMAL); For setting the phone in Vibrate mode.. audio_mngr .setRingerMode(AudioManager.RINGER_MODE_VIBRATE);