Reduce Notification vibration intensity to zero in android programatically
<p>In my application, I want turn off the vibration when notification comes. I am able to mute the sound of notification but not able to stop the vibration.</p>

<p>To mute the sound of notification, I have used following code:</p>

<pre><code> if (audioManager.getStreamVolume(AudioManager.STREAM_NOTIFICATION) != value) {
        audioManager.setStreamVolume(AudioManager.STREAM_NOTIFICATION, value, 0);
        Utils.log("Volume Changed to " + value);
    }
</code></pre>

<p>Please suggest how to change the notification vibration intensity to zero or suggest some other way to cancel vibration when notification arrives.</p>

<pre><code>audio.setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION,
        AudioManager.VIBRATE_SETTING_OFF);
</code></pre>

<p>setVibrateSetting is not working and is deprecated</p>

<p>I can manually change vibration intensity of notification in Samsung devices by:</p>

<ol>
<li>Go to Setting</li>
<li>Go to My Device tab</li>
<li>Tap on Sound and open “Vibration intensity”</li>
<li>Choose the vibration intensity for Incoming Call, Notification, and Haptic Feedback</li>
</ol>

<p>But how can I do it programatically? please help.</p>