I've looked everywhere I can think of to find an answer to this, and there are LOTS of questions about the audio in Android, but none that I can find that talk about the new settings in ICS.
My app has a feature where the users can press a button and the phone's ringer will be silent, along with no vibration. Here is my code, which up until now has worked fine:
mAudioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
mAudioManager.setStreamVolume(AudioManager.STREAM_RING, 0, 0);
Now what happens is that when the user presses the button, the volume goes to 0 still, but the phone, specifically the Galaxy S3, has a short vibrate. Then in Settings->Sound, Silent Mode has been changed from Off to Vibrate. So whenever certain things happen, it still has that short vibrate notification. I haven't been able to test thoroughly enough to know what specifically happens in order for it to vibrate like that, but that's not the point of the question.
My question is how can we control the ICS Silent Mode settings of Off, Vibrate, and Mute? I want to be able to set it to Mute when they hit that button, and then go back to Off, or whatever they had it set to, when they hit it again. I tried using the mAudioManager.setStreamMute method, but this is not the desired effect, and it also doesn't change the setting of Silent Mode.
Thanks in advance for any help, it's much appreciated!!
Paul