Example usage for android.media AudioManager setVibrateSetting

List of usage examples for android.media AudioManager setVibrateSetting

Introduction

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

Prototype

public void setVibrateSetting(int vibrateType, int vibrateSetting) 

Source Link

Document

Sets the setting for when the vibrate type should vibrate.

Usage

From source file:Main.java

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

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 void setVibrateOnly(AudioManager audiomanager) {
    audiomanager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);
    audiomanager.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_ON);
}