Example usage for android.media AudioManager VIBRATE_SETTING_OFF

List of usage examples for android.media AudioManager VIBRATE_SETTING_OFF

Introduction

In this page you can find the example usage for android.media AudioManager VIBRATE_SETTING_OFF.

Prototype

int VIBRATE_SETTING_OFF

To view the source code for android.media AudioManager VIBRATE_SETTING_OFF.

Click Source Link

Document

Vibrate setting that suggests to never vibrate.

Usage

From source file:Main.java

public static void setRingOnly(AudioManager audiomanager) {
    audiomanager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
    audiomanager.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
}

From source file:Main.java

public static boolean isRingOnly(AudioManager mAudioManager) {
    int ringerMode = mAudioManager.getRingerMode();
    int vibrateMode = mAudioManager.getVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER);
    return ringerMode == AudioManager.RINGER_MODE_NORMAL && vibrateMode == AudioManager.VIBRATE_SETTING_OFF;
}