Set Ringer to Silent

RINGER_MODE_SILENT was added in API Level 1
Ringer mode that will be silent and will not vibrate. (This overrides the vibrate setting.)

1. Initialize an AudioManager Variable named myAudioManager.

2. In the MainActivity.java file, add the following code the onCreate method. This will set the ringer to silent.

myAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);

3. Compile and run!

Next Recommended Article: Set Ringer to Normal

Resources:
http://developer.android.com/reference/android/media/AudioManager.html#RINGER_MODE_SILENT