0

I am trying to set my Galaxy Nexus to ring with no vibration by code. I have tried in a hundred ways but didn't get it. I used this:

Settings.System.putInt(getContentResolver(), "vibrate_when_ringing", 0);
audiomanager.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF);
setRingerMode...

But there is no way. It seems like if I have volume for calls then it has to vibrate!

I just want it to set up to receive calls hearing the tone but without any vibration. Thanks

Charles
  • 50,943
  • 13
  • 104
  • 142
Ton
  • 9,235
  • 15
  • 59
  • 103
  • The "vibrate when ringing" checkbox in Settings works fine on my Galaxy Nexus. If that checkbox is not working for you, then your issue is with your device, not your code. – CommonsWare Oct 11 '12 at 18:06
  • https://groups.google.com/forum/#!msg/tasker/NaZMattE2k0/_xQRAsEvKCEJ – user1390816 Oct 11 '12 at 18:39

2 Answers2

0

Take a look at this:link

Maybe you have success with the Vibrator Object.

EDIT: Maybe here the method setPhoneVibrateSettingValue helps

Community
  • 1
  • 1
user1390816
  • 623
  • 2
  • 13
  • 34
0

I responded in another thread, but wanted to say this here as well. Your code is good for >4.1. Just make sure you add permission:

<uses-permission android:name="android.permission.WRITE_SETTINGS"/>

I was scouring threads and came up with the solution to put the permission in and BAM, it worked!

Tim L
  • 1
  • 1