Reputation: 5141
On android how can I know if vibration setting is turned on? I know how to get ringer mode (normal, silent, vibrate) from AudioManager but that's not what I want. On most android devices there's this setting "Vibrate when ringing". I want to know the value of this setting.
Upvotes: 0
Views: 400
Reputation: 5141
I found it! This is how it's done.
boolean vibrateWhenRinging = false;
try {
vibrateWhenRinging = (Settings.System.getInt(getContentResolver(), "vibrate_when_ringing") == 1);
} catch (SettingNotFoundException e) {
}
Upvotes: 2