whiteberryapps whiteberryapps - 1 year ago 82
Android Question

Is it possible to turn off the silent mode programmatically in android?

Is it possible to turn off the silent mode programmatically in Android?

Answer Source

Solution for you .

AudioManager am;
am= (AudioManager) getBaseContext().getSystemService(Context.AUDIO_SERVICE);

//For Normal mode
am.setRingerMode(AudioManager.RINGER_MODE_NORMAL);

//For Silent mode
am.setRingerMode(AudioManager.RINGER_MODE_SILENT);

//For Vibrate mode
am.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);