You can set the ringer method to RINGER_MODER_NORMAL (Sound and vibrate on) and separately set the vibrate setting to VIBRATE_SETTING_OFF(turn off vibrate completely) OR VIBRATE_SETTING_ONLY_SILENT.(Vibrate only if the mode is silent) as below:
To turn off ringtone vibrations:
setVibrateSetting (AudioManager.VIBRATE_TYPE_RINGER,AudioManager.VIBRATE_SETTING_OFF)
To turn off notification vibrations:
setVibrateSetting (AudioManager.VIBRATE_TYPE_NOTIFICATION,AudioManager.VIBRATE_SETTING_OFF)
UPDATE:To get the status of the current audio mode by
if(getRingerMode ()==AudioManager.RINGER_MODE_NORMAL)
{ if((getVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER))==AudioManager.AudioManager.VIBRATE_SETTING_OFF){
Log.d("Ringer Mode is":"ring with no vibraion")
}
else{
Log.d("Ringer Mode is":"ring with vibraion")
}
else if(getRingerMode ()==AudioManager.RINGER_MODE_SILENT){
if((getVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER))==AudioManager.AudioManager.VIBRATE_SETTING_OFF){
Log.d("Ringer Mode is":"Silent with no vibraion")
}
else{
Log.d("Ringer Mode is":"Silent with vibraion")
}
}
else{
Log.d("Ringer Mode is":"Silent with vibraion")
}
In the Docs it is said that it RINGER_MODE_SILENT mode will override the vibrate setting.
PS: According to DOC get/setVibrateSetting()**method was **deprecated in API level 16.
Note: I havent Tested the code.