问题
i made an app that messes with the system vibrate settings. namely, it turns them off.
AudioManager audioManager = (AudioManager)ctx.getSystemService(Context.AUDIO_SERVICE);
audioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
audioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION, AudioManager.VIBRATE_SETTING_OFF);
System.putInt(ctx.getContentResolver(), VIBRATE_IN_SILENT, 0);
i wonder now, where i can turn the vibration manually back on. the ringer vibrate setting can be found in the Sound settings, but where is the notification setting? the setting in the SMS app is still on "vibrate always", but the phone does not vibrate anymore when receiving a text. can this setting just be turned on/off programmatically?
btw: i am using a Nexus One with Android 2.3.3
Thx Simon
回答1:
All you have to do is the exact same thing you did above except set AudioManager.VIBRATE_SETTING_OFF
to AudioManager.VIBRATE_SETTING_ON
来源:https://stackoverflow.com/questions/7933470/where-is-the-setting-setvibratesettingaudiomanager-vibrate-type-notification-f