I am looking for how we change the vibrate settings in Jelly Bean. I found that all the pre-JB vibrate settings have been deprecated, but don't see any new AudioManager.[change the vibrate settings] code anywhere. There is a setting "Vibrate when ringing" which I would like to know how to play with.
Thanks for you help.
This issue has plagued me for a couple of days now. Finally got it working. Make sure that you have the right permissions as well.
uses-permission android:name="android.permission.WRITE_SETTINGS"/
Then in my on click listener I utilized the following:
From the Documentation:
Seems like Google wants Vibration settings to be handled by each app for itself on an app to app basis, adjusting it's settings by querying getRingerMode().
Settings.System.VIBRATE_WHEN_RINGING
is declared with @hide annotation so you may have troubles to use it in Android Studio. So maybe you have to replaceSettings.System.VIBRATE_WHEN_RINGING
by its value :"vibrate_when_ringing"
It is annoying that it is declared with the @hide annotation, because it means that Google don't want external developpers using it...
In android4.1 you can use this to control "vibrate & ringing"