Code example for AudioManager

Methods: getRingerModesetRingerMode

0
                            vib.vibrate(pattern, -1); 
                            log("face over, lets go silent!"); 
                        } 
                        break; 
                    case MODE_VIBRATE: 
                        if (am.getRingerMode() == AudioManager.RINGER_MODE_NORMAL) { 
                            am.setRingerMode(MODE_VIBRATE); 
                            switchSoundBack = true; 
                            wasFaceUp = false; 
                            wasFaceDown = true; 
                            vib.vibrate(pattern, -1); 
                            log("face over, lets go vibrate!"); 
                        } 
                        break; 
                } 
            } 
        } 
    }; 
 
    private Runnable screenOffTimer = new Runnable() {
        @Override