Hi,

I've got some problems muting the phone via code. The app I develop
should mute the phone when a call comes in. This means it should not
ring and vibrate at all. My first attempt so archive this was setting
the AudioManager Ringer Mode to RINGER_MODE_SILENT using the following
code.

AudioManager am = (AudioManager)
this.getSystemService(Context.AUDIO_SERVICE);
am.setRingerMode(AudioManager.RINGER_MODE_SILENT);

While the phone stops ringing it continues to vibrate although the
documentation of RINGER_MODE_SILENT says it should also stop
vibrating.

My second attempt was to switch off the vibration mode manually.
am.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER,
AudioManager.VIBRATE_SETTING_OFF );

But this also doesn't stop the phone vibrating.

So, does anyone has an idea what I'm doing wrong?

Bye,
Flo





-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to