Reputation: 7117
I can't find a way I can activate and deactivate the vibration at the time of incoming calls.
The option in the menu --> Settings --> Sounds & Display mentions - PHONE VIBRATE - vibrate phone for incoming calls...
I want to activate and deactivate it through code (if possible).
Upvotes: 1
Views: 1975
Reputation: 4223
Have a look AudioManager:
http://d.android.com/reference/android/media/AudioManager.html
and setRingerMode/setVibrateSetting:
http://d.android.com/reference/android/media/AudioManager.html#setRingerMode(int)
http://d.android.com/reference/android/media/AudioManager.html#setVibrateSetting(int, int)
Upvotes: 1